Returns the select query builder

@param string|array $select Column list

@return Eden\Sql\Select
774743
public function select($select = 'ROWID,*')
    {
        //Argument 1 must be a string or array
        Argument::i()->test(1, 'string', 'array');
        
        return \Eden\Sql\Select::i($select);
    }
756223
protected function initPaginator($select)
    {
        $this->usePaginator = false;

        $this->paginator = new Paginator(
                    $select,
                    $this->tableGateway->getAdapter(),
                    $this->tableGateway->getResultSetPrototype());

        if (isset($this->paginatorOptions['n'])) {
            $this->paginator->setN($this->paginatorOptions['n']);
        }
        if (isset($this->paginatorOptions['p'])) {
            $this->paginator->setP($this->paginatorOptions['p']);
        }
        if (isset($this->paginatorOptions['c'])) {
            $this->paginator->setC($this->paginatorOptions['c']);
        }
        if (isset($this->paginatorOptions['s'])) {
            $this->paginator->setS($this->paginatorOptions['s']);
        }
        if (isset($this->paginatorOptions['d'])) {
            $this->paginator->setD($this->paginatorOptions['d']);
        }
        if (isset($this->paginatorOptions['o'])) {
            $this->paginator->setO($this->paginatorOptions['o']);
        }

        return $this->paginator->getItems();
    }
1192471
public function select($select = '*')
    {
        //Argument 1 must be a string or array
        Argument::i()->test(1, 'string', 'array');
        
        //if select is an array
        if (is_array($select)) {
            //transform into a string
            $select = implode(', ', $select);
        }
        
        $this->select = $select;
        
        return $this;
    }
849870
public function select($selects = array())
    {
        $this->type = self::SELECT;

        if (!empty($selects)) {
            $this->parts['select'] = array_merge($this->parts['select'], (array) $selects);
        }

        return $this;
    }
1313020
protected function getListSelect($column, $key) {
        $select = is_null($key) ? [$column] : [$column, $key];

        // If the selected column contains a "dot", we will remove it so that the list
        // operation can run normally. Specifying the table is not needed, since we
        // really want the names of the columns as it is in this resulting array.
        return array_map(function ($column) {
            $dot = strpos($column, '.');

            return $dot === false ? $column : substr($column, $dot + 1);
        }, $select);
    }
390586
protected function executeSelect(Select $select)
    {
        $selectState = $select->getRawState();
        if ($selectState['table'] != $this->table) {
            throw new \RuntimeException('The table name of the provided select object must match that of the table');
        }

        // We don't want use default table columns as default select columns state
        /*if ($selectState['columns'] == array(Select::SQL_STAR)
            && $this->columns !== array()) {
            $select->columns($this->columns);
        }*/

        // apply preSelect features
        $this->featureSet->apply('preSelect', array($select));

        // prepare and execute
        /** @var \Zend\Db\Adapter\Driver\Pdo\Statement $statement */
        $statement = $this->sql->prepareStatementForSqlObject($select);
        $result = $statement->execute();

        // build result set
        $resultSet = clone $this->resultSetPrototype;
        $resultSet->initialize($result);

        // apply postSelect features
        $this->featureSet->apply('postSelect', array($statement, $result, $resultSet));

        return $resultSet;
    }
1222586
public function select($options = [])
    {
        $sql = str_replace(
            ['%TABLE%', '%DISTINCT%', '%FIELD%', '%JOIN%', '%WHERE%', '%GROUP%', '%HAVING%', '%ORDER%', '%LIMIT%', '%UNION%', '%LOCK%', '%COMMENT%', '%FORCE%'],
            [
                $this->parseTable($options['table'], $options),
                $this->parseDistinct($options['distinct']),
                $this->parseField($options['field'], $options),
                $this->parseJoin($options['join'], $options),
                $this->parseWhere($options['where'], $options),
                $this->parseGroup($options['group']),
                $this->parseHaving($options['having']),
                $this->parseOrder($options['order'], $options),
                $this->parseLimit($options['limit']),
                $this->parseUnion($options['union']),
                $this->parseLock($options['lock']),
                $this->parseComment($options['comment']),
                $this->parseForce($options['force']),
            ], $this->selectSql);
        return $sql;
    }
1178270
function Select($sql)
	{
		$this->RequireConnection(true);

		$this->handler->Log(DBH_LOG_QUERY, "Executing Query", $sql);
		
		return $this->adapter->Select($sql);
	}
419384
protected function prepareSubquerySelect(Select $select) {
		$select->reset(Select::LIMIT_OFFSET)
		       ->reset(Select::LIMIT_COUNT)
		       ->reset(Select::ORDER);

		$countSelect = $select->getAdapter()->select()
			->from($select)
			->reset(Select::COLUMNS)
			->columns([self::COUNT_COLUMN => 'count(1)']);

		return $countSelect;
	}
167807
protected function getSelectColumns( $columns = null )
    {
        if ( null === $columns )
        {
            $properties = true;
        }
        elseif ( ( $index = array_search( self::PROPERTIES_FIELD, $columns ) ) )
        {
            $properties = true;
            unset( $columns[$index] );
        }
        else
        {
            $properties = false;
        }

        $columns = parent::getSelectColumns( $columns );

        if ( $properties )
        {
            $platform = $this->getDbAdapter()
                             ->getPlatform();

            $columns[self::PROPERTIES_FIELD] = new Sql\Expression( '(' .
                $this->sql( $this->getTableInSchema(
                        static::$propertyTableName
                     ) )
                     ->select()
                     ->columns( array(
                         new Sql\Expression( 'TEXT( ARRAY_TO_JSON(
                             ARRAY_AGG( ? ORDER BY CHAR_LENGTH( ? ) ASC )
                         ) )', array(
                             static::$propertyTableName,
                             'name',
                         ), array(
                             Sql\Expression::TYPE_IDENTIFIER,
                             Sql\Expression::TYPE_IDENTIFIER,
                         ) )
                     ) )
                     ->where( array(
                         new Predicate\Expression(
                             $platform->quoteIdentifier( 'ruleId' ) .
                             ' = ' .
                             $platform->quoteIdentifierChain( array(
                                 static::$tableName, 'id'
                             ) )
                         )
                     ) )
                     ->getSqlString( $platform ) .
            ')' );
        }

        return $columns;
    }
1063439
public function getRow($select)
    {
        if (!is_object($select)) {
            $select = $this->select($select);
        }
        $select->limit(1);
        return $this->getRows($select)->current();
    }
982260
public function getCustom($id, array $select = array())
    {
        $supported = $this->isSupported('get');

        return (true === $supported) ? $this->makeRequest("{$this->endpoint}/$id", array('select' => $select)) : $supported;
    }
1054662
public function select($field, string $as = null, bool $reset = true): self
    {
        $reset && $this->reset();

        // handle trivial selects
        if ($field === 1 || $field === '1') {
            return $this->push('select', '1');
        } elseif ($field === true) {
            return $this->push('select', 'TRUE');
        }

        // handle other query object
        if ($field instanceof Builder || $field instanceof Sql) {
            if ($as == null) {
                throw new BuilderException('Alias required!');
            }
            return $this->push('select', '('. $field->toString() .') AS '. $this->agent->quoteField($as));
        }

        $field = $this->prepareField($field);
        if ($as != null) {
            $field = $field .' AS '. $this->agent->quoteField($as);
        }

        return $this->push('select', $field);
    }
530893
public function getChildBoxes($select = array())
    {
        if (is_array($select)) {
            $select = new Kwf_Component_Select($select);
        } else {
            $select = clone $select;
        }
        $select->whereBox(true);
        return $this->getRecursiveChildComponents($select);
    }
117414
public function makeSelect(string $connectionName = ''): SelectQueryBuilder
    {
        $connection = $this->provideConnection($connectionName);
        $statementBuilder = new SelectStatementBuilder;
        return new SelectQueryBuilder($connection, $statementBuilder);
    }
251498
public function select($columns = "*") : QueryBuilder
    {
        $this->_query[] = "SELECT";

        //Parse column(s)
        if(is_array($columns)) {
            $select_columns = "";

            $size = sizeof($columns);
            for($i = 0; $i < $size; $i++) {
                if($i > 0) {
                    $select_columns .= ', ';
                }

                $select_columns .= '`'. $this->sanitize((string)$columns[$i]) .'`';
            }

            $this->_query[] = $select_columns;

            return $this;
        }

        $select_columns = "*";
        if(
            !empty($columns) &&
            $columns !== "*"
        ) {
            $select_columns = '`'. $this->sanitize((string)$columns) .'`';
        }

        $this->_query[] = $select_columns;

        return $this;
    }
1042447
public function select(SQLStatement $select): string
    {
        $limit = $select->getLimit();

        if ($limit <= 0) {
            return parent::select($select);
        }

        $sql = $select->getDistinct() ? 'SELECT DISTINCT ' : 'SELECT ';
        $sql .= $this->handleColumns($select->getColumns());
        $sql .= ' FROM ';
        $sql .= $this->handleTables($select->getTables());
        $sql .= $this->handleJoins($select->getJoins());
        $sql .= $this->handleWheres($select->getWheres());
        $sql .= $this->handleGroupings($select->getGroupBy());
        $sql .= $this->handleOrderings($select->getOrder());
        $sql .= $this->handleHavings($select->getHaving());

        $offset = $select->getOffset();

        if ($offset < 0) {
            return 'SELECT * FROM (' . $sql . ') M1 WHERE ROWNUM <= ' . $limit;
        }

        $limit += $offset;
        $offset++;

        return 'SELECT * FROM (SELECT M1.*, ROWNUM AS OPIS_ROWNUM FROM (' . $sql . ') M1 WHERE ROWNUM <= ' . $limit . ') WHERE OPIS_ROWNUM >= ' . $offset;
    }