/* (non-PHPdoc)
@see \n2n\persistence\orm\query\select\Selection::bindColumns()
424707
public function bindColumns(PdoStatement $stmt, array $columnAliases) {
		foreach ($columnAliases as $key => $columnAlias) {
			$this->values[$key] = null;
			$stmt->shareBindColumn($columnAlias, $this->values[$key]);
		}
	}
682841
public function addColumn($columns)
    {
        unset($columns['date']);

        foreach ($this->data as $id => $field) {
            if (isset($field->show_admin_column) && $field->show_admin_column) {
                $columns[$id] = $field->label;
            }
        }

        $columns['date'] = __('Date');

        return $columns;
    }
1652
public function columns($columns)
  {
    if ( is_null($this->columns) ){
      $this->columns = new Element('()', $columns);
    }
    else {
      $this->columns->append($columns);
    }

    return $this;
  }
159611
public function addSelfSelectColumns()
    {
        call_user_func(array($this->modelPeerName, 'addSelectColumns'), $this, $this->useAliasInSQL ? $this->modelAlias : null);

        return $this;
    }
291265
public function addWhereIn(string $column, array $values)
    {
        foreach ($values as $value) {  // pour bindValue(s)
            $this->wheresIn[][2] = $value;
        }

        $this->sql['where'] .= " ".$this->logicOperator." ".$column." IN ".$this->addConditionsToSqlWhithWhereIn()." ";

        $this->logicOperator = " AND ";
    }
248358
public function select($columns = [])
    {
        parent::select($columns);
        $compiler = $this->connection->getCompiler();
        return $this->connection->query($compiler->select($this->sql), $compiler->getParams());
    }
781765
protected function _addColumnsStatement()
    {
        $columns = $this->_sql->getColumns();
        if (empty($columns)) {
            return null;
        }

        return $this->_parseColumns();
    }
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;
    }
632965
public function setSortableColumns($columns = array())
    {
        $repository = $this->get('orm.em')->getRepository($this->getEntityClass());

        foreach ($columns as $column => $options) {
            $sortMethodName = 'getQueryBuilderOrderedBy'.ucfirst(strtolower($column));
            if (method_exists($repository, $sortMethodName)) {
                $columns[$column]['sortable'] = true;
                continue;
            }
            if (property_exists($this->getEntityClass(), $column)) {
                // OneToMany and ManyToMany relations are not sortable
                $reader = new \Doctrine\Common\Annotations\AnnotationReader();
                $reflProperty = new \ReflectionProperty($this->getEntityClass(), $column);
                $OneToMany = $reader->getPropertyAnnotation($reflProperty, '\Doctrine\ORM\Mapping\OneToMany');
                $ManyToMany = $reader->getPropertyAnnotation($reflProperty, '\Doctrine\ORM\Mapping\ManyToMany');
                if (!$OneToMany && !$ManyToMany) {
                    $columns[$column]['sortable'] = true;
                    continue;
                }
            }
            $columns[$column]['sortable'] = false;
        }

        return $columns;
    }
1183728
public function select($cols = array('*'))
    {
        if (!is_array($cols)) {
            $cols = func_get_args();
        }
        return new Query("SELECT", $cols, $this->connectionName);
    }
615770
public function setColumns($columns)
    {
        if (is_string($columns)) {
            $columns = explode(',', $columns);
            $columns = ArrayMethods::trim($columns);
        }
        $this->_columnNames = $columns;
        return $this;
    }
187456
public function setQueriedColumns($queriedColumns)
    {
        return $this->alterDataQuery(function (DataQuery $query) use ($queriedColumns) {
            $query->setQueriedColumns($queriedColumns);
        });
    }
741384
public function select($columns = '*')
    {
        settype($columns, 'array');

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

        return $columns;
    }
247601
public function makeSelect(array $columns = null)
    {
        $columns = $columns ?: $this->columns();
        $selects = [];

        foreach ($columns as $key => $select) {
            if (is_int($key)) {
                $selects[] = $select;
            } else {
                $selects[] = DB::raw($select.' as '.$key);
            }
        }

        return $selects;
    }
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;
    }
94327
private function bindResultFields()
    {
        $resultMetadata = $this->mysqliStatement->result_metadata();

        if ($resultMetadata !== false) {
            $this->resultFields = array();

            foreach ($resultMetadata->fetch_fields() as $field) {
                $this->resultFields[] = $field->name;
            }

            $resultMetadata->free();
        }
    }