设置多列

@param array $cols
@return self
764861
public function cols(array $cols)
    {
        if ($this->type == 'SELECT') {
            foreach ($cols as $key => $val) {
                $this->addColSELECT($key, $val);
            }
            return $this;
        }
        return $this->addCols($cols);
    }
781137
public function setColumns(array $columns)
    {
        foreach ($columns as $column) {
            $this->columns->push($column);
        }

        return $this;
    }
1049347
public function setHiddenColumns( $columns )
    {
        $this->hiddenColumns = array();

        foreach ( $columns as $column )
        {
            $this->hiddenColumns[] = $column;
        }

        return $this;
    }
312048
public function orColumns(array $columns)
    {
        foreach ($columns as $column => $value) {
            $this->orColumn($column, $value);
        }

        return $this;
    }
401639
public function orWhereMultiple(array $columns)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->orWhereMultiple($columns);

        return $instance;
    }
63581
public function uSortMultipleColumn($columns)
    {
        $dataFormats = $this->dataFormats;
        $sort = function ($a, $b) use ($columns, $dataFormats) {
            foreach ($columns as $colName => $fn) {
                $tmp = $fn($a[$colName], $b[$colName]);
                if ($tmp !== 0) {
                    return $tmp;
                }
            }
            return 0;
        };

        uasort($this->data, $sort);
        return $this;
    }
884302
public function columns($columns = '*')
    {
        if (false === is_array($columns) && $columns != '*') {
            $columns = func_get_args();
        }
        foreach ($columns as $column) {
            $this->sql['columns'][$column] = 1;
        }
        return $this;
    }
933073
function columns(array $columns)
    {
        foreach ($columns as &$col) {
            if (!$col instanceof Attribute) {
                $col = new UnqualifiedColumn($col);
            }
        }
        $this->nodes->columns = $columns;
        return $this;
    }
1126141
public function columns($columns) {
		foreach ($columns as $property => $definition) {
			if (is_bool($definition)) {
				$this->_properties[$property] = $definition;
				continue;
			}
			
			$this->addAccumulator($property, $definition);
		}
		
		return $this;
	}
356837
public function addColumns(array $cols) {
        foreach ($cols as $col) {
            $this->cols[] = DataColumn::fromArray($col);
        }
    }
974789
public function select($columns= '*') {
        if (!is_array($columns)) {
            $columns= trim($columns);
            if ($columns == '*' || $columns === $this->_alias . '.*' || $columns === $this->xpdo->escape($this->_alias) . '.*') {
                $columns= $this->xpdo->getSelectColumns($this->_class, $this->_alias, $this->_alias . '_');
            }
            $columns= explode(',', $columns);
            foreach ($columns as $colKey => $column) $columns[$colKey] = trim($column);
        }
        if (is_array ($columns)) {
            if (!is_array($this->query['columns'])) {
                $this->query['columns']= $columns;
            } else {
                $this->query['columns']= array_merge($this->query['columns'], $columns);
            }
        }
        return $this;
    }
508227
public function dropUnique($columns)
    {
        $unique = new Unique($columns, $this);

        $this->actions[] =  function () use ($unique) {
             return $this->manipulation->drop($unique);
        };

        return $this;
    }
1115206
public function select($columns = '*') 
    {
        $this->sql = 'SELECT ';
        
        if(is_array($columns)) {
            foreach($columns as $column) {
                $this->sql .= $this->quoteColumnName($column) . ', ';
            }
            
            $this->sql = trim($this->sql, ', ') . ' ';
        } else {
            $this->sql .= '* ';
        }
        
        return $this;
    }
64788
protected function addReturning(array $cols)
    {
        foreach ($cols as $col) {
            $this->returning[] = $this->quoteNamesIn($col);
        }
        return $this;
    }
71244
public function columns(array $columns)
    {
        $columns = array_unique($columns);

        foreach ($columns as &$column) {
            $column = $this->dialect()->quoteTable($column);
        }
        unset($column);

        $this->columns = $columns;

        return $this;
    }
704072
public function order_by( $cols, $order = 'asc' ) 
	{
		if ( !is_array( $cols ) ) 
		{
			$this->orders[] = array( $cols, $order ); return $this;
		}
		else
		{
			foreach( $cols as $key => $col ) 
			{
				if ( is_numeric( $key ) ) 
				{
					$this->orders[] = array( $col, $order );	
				} 
				else 
				{
					$this->orders[] = array( $key, $col );
				}
			}
		}
		
		return $this;
	}
1087280
protected function multipleCol(array $cols, /*# bool */ $rawMode)
    {
        foreach ($cols as $key => $val) {
            if (is_int($key)) {
                $this->realCol($val, '', $rawMode);
            } else {
                $this->realCol($key, $val, $rawMode);
            }
        }
    }