Specify columns to return from the SQL query.

@param string $columns Columns to return from the query.
@return xPDOQuery Returns the current object for convenience.
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;
    }
1349818
public function get(array $columns = ['*']): ResultInterface
    {
        if (empty($columns)) {
            $columns = ['*'];
        }

        $isAllColumns = count($columns) == 1 && isset($columns[0]) && $columns[0] == '*';
        if (!empty($this->className) && $isAllColumns) {
            $columns = $this->getAllFields();
        }

        foreach ($columns as $column => $alias) {
            if (\is_int($column)) {
                $this->select[$alias] = null;
                continue;
            }
            $this->select[$column] = $alias;
        }

        $this->addGetDecorator();

        return $this->execute();
    }
1297821
public function get($columns = ['*'])
    {
        return $this->select($columns)->map(function ($row) {
            return Finder::createStore($row);
        });
    }
193127
public static function getTree(array $columns = ['*'])
    {
        /**
         * @var Entity $instance
         */
        $instance = new static;

        return $instance->orderBy($instance->getParentIdColumn())->orderBy($instance->getPositionColumn())
            ->get($instance->prepareTreeQueryColumns($columns))->toTree();
    }
998217
public function group($columns)
	{
		if (is_null($this->group))
		{
			$this->group = new Query\QueryElement('GROUP BY', $columns);
		}
		else
		{
			$this->group->append($columns);
		}

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

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

        return $instance;
    }
751093
protected function enforceIdColumn($columns)
    {
        if (!in_array($this->entityMap->getKeyName(), $columns)) {
            $columns[] = $this->entityMap->getKeyName();
        }

        return $columns;
    }
1200334
public function setColumns(array $columns)
    {
        $this->mappingColumns = null;
        $this->columns = array_values($columns);

        return $this;
    }
990724
public function columns($columns = '*')
    {
        if ('*' == $columns) {
            $this->columns = ['*'];
        } else {
            $columns = $this->prepareNames(func_get_args());
            $this->columns = array_values(array_diff($columns, ['*']));
        }
        return $this;
    }
830852
public function get($columns = ['*'])
    {
        $result = $this->getBuilder()->get($columns);

        // Reset query builder
        $this->resetBuilder();

        return $result;
    }
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;
    }
1337835
public function get($columns = ['*'])
    {
        return collect($this->onceWithColumns(Arr::wrap($columns), function () {
            return $this->processor->processSelect($this, $this->runSelect());
        }));
    }
940439
protected function extractColumns($columns)
    {
        $schema = [];

        foreach ($columns as $name => $data) {
            $schema[$name] = $this->extractColumn($data);
        }

        return $schema;
    }
1082579
public function columns(string $column, string ...$columns)
    {
        array_unshift($columns, $column);

        foreach ($columns as $column) {
            $this->column($column);
        }

        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;
    }
765515
public function whereMultiple(array $columns)
    {
        $instance = $this->whereStrategyInstance();

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

        return $instance;
    }
455856
public function columns($columns)
    {
        if (is_string($columns)) {
            $columns = preg_split('~\s*,\s*~', trim($columns));
        }

        $this->columns = $columns;

        return $this;
    }