Execute the query as a fresh "select" statement.

@param  array $columns
@return array|static[]|Collection
161741
protected function getFresh($columns = [])
    {
        // If no columns have been specified for the select statement, we will set them
        // here to either the passed columns, or the standard default of retrieving
        // all of the columns on the table using the "wildcard" column character.
        if (is_null($this->columns)) {
            $this->columns = $columns;
        }

        // Drop all columns if * is present, MongoDB does not work this way.
        if (in_array('*', $this->columns)) {
            $this->columns = [];
        }

        // Compile wheres
        $wheres = $this->compileWheres();

        // Use MongoDB's aggregation framework when using grouping or aggregation functions.
        if ($this->groups || $this->aggregate) {
            return $this->getFreshGroupAndAggregate($wheres);
        }

        // Return distinct results directly
        if ($this->distinct) {
            return $this->getFreshDistinct($wheres);
        }

        return $this->getFreshNormal($wheres);
    }
19438
public function getFresh($columns = array('*'))
    {
        if (is_null($this->columns)) $this->columns = $columns;

        return $this->processor->processSelect($this, $this->runSelect());
    }
312048
public function orColumns(array $columns)
    {
        foreach ($columns as $column => $value) {
            $this->orColumn($column, $value);
        }

        return $this;
    }
1297821
public function get($columns = ['*'])
    {
        return $this->select($columns)->map(function ($row) {
            return Finder::createStore($row);
        });
    }
765515
public function whereMultiple(array $columns)
    {
        $instance = $this->whereStrategyInstance();

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

        return $instance;
    }
684891
public function get($columns = ['*'])
    {
        $builder = $this->prepareQueryBuilder($columns);

        $models = $builder->getModels();

        // 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);
    }
1092732
public function getFresh($columns = array('*'))
	{
		// If no columns have been specified for the select statement, we will set them
		// here to either the passed columns, or the standard default of retrieving
		// all of the columns on the table using the "wildcard" column character.
		if (is_null($this->columns))
		{
			$this->columns = $columns;
		}

		// Drop all columns if * is present, MongoDB does not work this way
		if (in_array('*', $this->columns))
		{
			$this->columns = array();
		}

		// Compile wheres
		$wheres = $this->compileWheres();

		// Aggregation query.
		if (isset($this->aggregate['function']))
		{
			switch ($this->aggregate['function'])
			{
				case 'count':
					$result = $this->collection->group(array(
						'key' => array('_id' => true),
						'initial' => array('count' => 0),
						'reduce' => "function(doc,out){ out.count++;}",
						'condition' => $wheres,

					));

					$result = count($result);
					break;

				case 'max':
				case 'min':
					$result = $this->collection->query(array(
						'query' => $wheres,
						'fields' => $this->columns,
						'sort' => array($this->columns[0] => $this->aggregate['function'] === 'max' ? -1 : 1),
						'limit' => 1,
					));
					$result = empty($result) ? 0 : $result[0][$this->columns[0]];
					break;

				default:
					$result = array();
					break;
			}

			return array(
				array(
					'aggregate' => $result,
				),
			);
		}
		// Normal query
		else
		{
			// Execute query.
			return $this->collection->query(array(
				'query' => $wheres,
				'fields' => $this->columns,
				'sort' => $this->orders,
				'skip' => $this->offset,
				'limit' => $this->limit,
			));
		}
	}
538884
public function columns($columns)
	{
		if (is_null($this->columns))
		{
			$this->columns = new Query\QueryElement('()', $columns);
		}
		else
		{
			$this->columns->append($columns);
		}

		return $this;
	}
327075
public function columns($columns) {
		if (is_array($columns))
			$this->columnList = $columns;
		else
			$this->columnList = func_get_args();
		return $this;
	}
406389
public function select($columns = "")
    {
        //check if columns were passed as individual string parameters

        if (func_num_args() > 1) {
            $this->columns = $this->columnize(func_get_args());
        } else {
            //check if a simgle array of columns was passed(a hack)
            $this->columns = is_array($columns) ? $this->columnize($columns)
                : self::sanitize($columns);
        }

        return $this;
    }
759864
public function withColumns(array $columns): self
    {
        $selector = clone $this;
        $selector->loader = $selector->loader->withColumns($columns);

        return $selector;
    }
303675
public function setColumns(array $columns)
    {
        foreach ($columns as $column) {
            $this->columns[] = new Request\Column($column);
        }

        return $this;
    }
1167595
public function first($columns = [])
    {
        $results = $this->select($columns)->limit(1)->get();

        // Since results may be returned inside an array if `raw()`
        // is specified, then we'll use our array helper
        // to retrieve the first result.
        return Arr::get($results, 0);
    }
859676
public function get($columns = ['*']) {
        if (count($columns) === 1 && isset($columns[0]) && $columns[0] === '*' && !empty($this->query->selects)) {
            return $this->query->all();
        }
        return $this->query->select($columns)->all();
    }
821232
public function checkExistsColumns($columns = [])
    {
        $this->connection();

        return $this->getSchema()->hasColumns($this->table, $columns);
    }
746190
public function columns(array $columns)
	{
		$columnsArray = array();
		foreach($columns as $column)
		{
			$columnsArray[] = $this->factory->references('Column', $column);
		}
		$this->insert->columns($columnsArray);

		return $this;
	}
412404
public function selectOnly(string $column, string ...$columns)
    {
        return $this->selectFrom($this, $column, ...$columns);
    }