Execute the query as a "select" statement.

@param  array  $columns
@return \Illuminate\Database\Eloquent\Collection|static[]
973364
public function get($columns = array('*'))
	{
		if (!$this->applyMetaFilters()) {
			if (!empty($this->aggregate)) {
				return 0;
			}
			return $this->model->newCollection();
		}
		
		if (!empty($this->aggregate)) {
			return parent::get($columns);
		}
		else {
			$results = parent::get(array('m.xref_id'));
		}
		
		if (empty($results)) {
			return $this->model->newCollection();
		}
		
		$xref_ids = array();
		foreach ($results as $result) {
			if (!isset($result->xref_id)) continue;
			$xref_ids[] = $result->xref_id;
		}
		
		if (empty($xref_ids)) {
			return $this->model->newCollection();
		}
		
		$key = $this->model->getKeyName();
		
		$models = $this->model->newQuery()->whereIn($key, $xref_ids)->get();
		
		$models->sortBy(function ($model) use ($xref_ids, $key) {
			foreach ($xref_ids as $idx => $i) {
				if ($model->{$key} == $i) {
					return $idx;
				}
			}
			return 0;
		});
		
		if (!empty($this->relations)) {
			$models->load($this->relations);
		}
		
		return $models;
	}
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;
    }
511456
protected function _get($columns = '*')
    {
        $data = $this->db->select($this->table, $columns, $this->where);

        if (empty($data)) {
            return false;
        }

        return $this->getModelObjects($data);
    }
173344
public function all($columns = array('*'))
    {
        $this->applyCriteria();
        $this->applyScope();

        if ($this->model instanceof \Illuminate\Database\Eloquent\Builder
            || $this->model instanceof \Illuminate\Database\Eloquent\Relations\Relation
        ) {
            $results = $this->model->get($columns);
        } else {
            $results = $this->model->all($columns);
        }

        $this->resetModel();

        return $this->parserResult($results);
    }
64634
public function get($columns = ['*'])
    {
        $original = $this->columns;

        if (is_null($original)) {
            $this->columns = $columns;
        }

        $results = $this->processor->processSelect($this, $this->runSelect());

        $this->columns = $original;

        return collect($results);
    }
1838
protected function shouldSelect(array $columns = ['*'])
    {
        if ($columns === ['*']) {
            $columns = [$this->related->getTable() . '.*'];
        }

        return array_merge($columns, $this->aliasedPivotColumns());
    }
821232
public function checkExistsColumns($columns = [])
    {
        $this->connection();

        return $this->getSchema()->hasColumns($this->table, $columns);
    }
185109
public function selectFrom($table, string $column, string ...$columns)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->columnsFrom($table, $column, ...$columns);

        return $instance;
    }
51482
public function get($columns = ['*'])
    {
        // First we'll add the proper select columns onto the query so it is run with
        // the proper columns. Then, we will get the results and hydrate out pivot
        // models with the result of those columns as a separate model relation.
        $columns = $this->query->getQuery()->columns ? [] : $columns;

        $builder = $this->query->applyScopes();

        $models = $builder->addSelect(
            $this->shouldSelect($columns)
        )->getModels();

        $this->hydratePivotRelation($models);

        // If we actually found models we will also eager load any relationships that
        // have been specified as needing to be eager loaded. This will solve the
        // n + 1 query problem for the developer and also increase performance.
        if (count($models) > 0) {
            $models = $builder->eagerLoadRelations($models);
        }

        return $this->related->newCollection($models);
    }
844787
public function get($columns = ['*'])
    {
        $models = parent::get($columns);

        $this->hydrateIntermediateRelations($models->all());

        return $models;
    }
165129
public function columns($columns){
        if(is_array($columns)) $this->columns = array_merge($this->columns,$columns);
        return self::getInstance();
    }
605070
public function select($columns = null)
	{
		$columns = func_get_args();

		$this->_select = array_merge($this->_select, $columns);

		return $this;
	}
705408
public function select(...$columns): Query\SelectQuery
    {
        $query = $this->engine->makeSelect();
        if (empty($columns) === false) {
            $query = $query->columns(...$columns);
        }
        return $query;
    }
1047658
protected function _addSelect(array $columns) {
		if(array_values($columns) === $columns) {
			foreach($columns as $k=>$v) {
				unset($columns[$k]);
				$columns[$v] = $v;
			}
		}
		$this->columns = array_merge($this->columns, $columns);
		return $this;
	}
428656
public function get($columns = ['*'])
    {
        $builder = $this->applyScopes();

        // If we actually found models we will also eager load any relationships that
        // have been specified as needing to be eager loaded, which will solve the
        // n+1 query issue for the developers to avoid running a lot of queries.
        if (count($models = $builder->getModels($columns)) > 0) {
            $models = $builder->eagerLoadRelations($models);
        }

        return $models;
    }
1229390
public function columns($columns = array())
    {
        foreach ((array) $columns as $key => $value)
        {
            if (is_string($key)) {
                $this->columns[$key] = $value;
            } else {
                $this->columns[] = $value;
            }
        }

        return $this;
    }
68741
private function processColumns(array $columns): array
    {
        $results = [];

        foreach ($columns as $column) {
            $types = [$column->phpType()];

            if ($column->isNullable()) {
                $types[] = 'null';
            }

            $results[$column->getName()] = $types;
        }

        return $results;
    }