protected function compileSelectPart(Query $query, array &$bindings): string
    {
        $columns = [];

        foreach (($query->select ?: ['*']) as $alias => $column) {
            if ($column instanceof Aggregate) {
                $column = $this->compileAggregate($column, $bindings);
            } else {
                $column = $this->compileIdentifier($column, $bindings);
            }

            $columns[] = $column.(is_string($alias) ? $this->compileAlias($alias) : '');
        }

        return 'SELECT '.implode(', ', $columns);
    }
protected function compileSelectPart(Query $query, array &$bindings): string
    {
        $columns = [];

        foreach (($query->select ?: ['*']) as $alias => $column) {
            if ($column instanceof Aggregate) {
                $column = $this->compileAggregate($column, $bindings);
            } else {
                $column = $this->compileIdentifier($column, $bindings);
            }

            $columns[] = $column.(is_string($alias) ? $this->compileAlias($alias) : '');
        }

        return 'SELECT '.implode(', ', $columns);
    }
protected function compileSelectPart ( Query $ query , array & $ bindings ) : string { $ columns = [ ] ; foreach ( ( $ query -> select ? : [ '*' ] ) as $ alias => $ column ) { if ( $ column instanceof Aggregate ) { $ column = $ this -> compileAggregate ( $ column , $ bindings ) ; } else { $ column = $ this -> compileIdentifier ( $ column , $ bindings ) ; } $ columns [ ] = $ column . ( is_string ( $ alias ) ? $ this -> compileAlias ( $ alias ) : '' ) ; } return 'SELECT ' . implode ( ', ' , $ columns ) ; }
Compiles a SELECT part of an SQL query.

@param Query $query Query data
@param array $bindings Bound values (array is filled by link)
@return string SQL text
Compiles a SELECT part of an SQL query .