Gets the results of the established query

@param   bool  $parseIncludes  Whether or not to parse the includes
@return  \Hubzero\Database\Rows
@since   2.0.0
771825
public function rows($parseIncludes = true)
	{
		// Fetch the results
		$rows = $this->rowsFromRaw($this->query->fetch('rows', $this->noCache));

		if ($parseIncludes)
		{
			$rows = $this->parseIncluding($rows);
		}

		// Set a few things on the rows object that might be helpful
		$rows->pagination = $this->pagination;
		$rows->orderBy    = $this->orderBy;
		$rows->orderDir   = $this->orderDir;
		return $rows;
	}
56939
protected function parseIncludes()
    {
        if ($this->query->has('includes')) {
            $this->query->setIncludes(
                explode(',', $this->query->getRaw('includes'))
            );
        }
    }
856056
public function getMergedDataTable($resultIndices)
    {
        $dataTableFactory = new DataTableFactory(
            $this->dataNames, $this->dataType, $this->sitesId, $this->periods, $this->defaultRow);

        $index = $this->getIndexedArray($resultIndices);

        return $dataTableFactory->makeMerged($index, $resultIndices);
    }
196563
public static function get_records($filters = array(), $sort = '', $order = 'ASC', $skip = 0, $limit = 0) {
        global $DB;

        $orderby = '';
        if (!empty($sort)) {
            $orderby = $sort . ' ' . $order;
        }

        $records = $DB->get_records(static::TABLE, $filters, $orderby, '*', $skip, $limit);
        $instances = array();

        foreach ($records as $record) {
            $newrecord = new static(0, $record);
            array_push($instances, $newrecord);
        }
        return $instances;
    }
1278599
protected function queryEntities(
        $table,
        $parsed_filter = '',
        $fields = null,
        $extras = [],
        $parse_results = false
    ) {
        $options = new QueryEntitiesOptions();
        $options->setSelectFields([]);

        if (!empty($fields) && (ApiOptions::FIELDS_ALL != $fields)) {
            if (!is_array($fields)) {
                $fields = array_map('trim', explode(',', trim($fields, ',')));
            }
            $options->setSelectFields($fields);
        }

        $limit = intval(array_get($extras, ApiOptions::LIMIT, 0));
        if ($limit > 0) {
            $options->setTop($limit);
        }

        if (!empty($parsed_filter)) {
            $query = new QueryStringFilter($parsed_filter);
            $options->setFilter($query);
        }

        try {
            /** @var QueryEntitiesResult $result */
            $result = $this->getConnection()->queryEntities($table, $options);

            /** @var Entity[] $entities */
            $entities = $result->getEntities();

            if ($parse_results) {
                return static::parseEntitiesToRecords($entities);
            }

            return $entities;
        } catch (ServiceException $ex) {
            throw new InternalServerErrorException("Failed to filter items from '$table' on Windows Azure Tables service.\n" .
                $ex->getMessage());
        }
    }
276879
public function search($conditions = [], $sorts = [], $joins = [], $pager = null, $mode = 'and')
    {
        $queryBuilder = $this->createQueryBuilder('o')->select('o');

        $this->queryBuilderConditions($queryBuilder, $conditions, $mode);
        $this->queryBuilderSorts($queryBuilder, $sorts);
        $this->queryBuilderJoins($queryBuilder, $joins);
        $this->queryBuilderPager($queryBuilder, $pager);

        return $queryBuilder->getQuery()->getResult();
    }
741730
public function fetchAllAsItems($pSingle = false)
    {
        $data = array();

        if ($this->_stm === false) {
            return $data;
        }

        while ($row = $this->_stm->fetch(PDO::FETCH_ASSOC)) {
            if ($pSingle) {
                return Agl::getModel($this->_dbContainer, $row);
            }

            $data[] = Agl::getModel($this->_dbContainer, $row);
        }

        return $data;
    }
801885
public function getResults()
    {
        if ($this->getParent()->{$this->morphType} === $this->morphName) {
            return $this->query->first();
        }
    }
507998
public function getRows(array $params = [])
    {
        $query = $this->createQueryBuilder('pc');

        if (array_key_exists('idPlayer', $params)) {
            $query->where('pc.idPlayer= :idPlayer')
                ->setParameter('idPlayer', $params['idPlayer']);
        }

        if (array_key_exists('limit', $params)) {
            $query->setMaxResults($params['limit']);
        }

        if (array_key_exists('orderBy', $params)) {
            $query->orderBy($params['orderBy']['column'], $params['orderBy']['order']);
        }

        return $query->getQuery()->getResult();
    }
694018
public function records($params)
    {
        if ($this->hasMethod('sourceRecords')) {
            return $this->sourceRecords($params, null, null);
        } else {
            $query = $this->sourceQuery($params);
            $results = ArrayList::create();
            foreach ($query->execute() as $data) {
                $class = $this->dataClass();
                $result = Injector::inst()->create($class, $data);
                $results->push($result);
            }
            return $results;
        }
    }
779156
public function getResults($models) {
        $is_one = !is_array($models) || !is_array(reset($models));
        if ($is_one) {
            $models = [$models];
        }
        $results = $this->getQueryResults($models);
        if (empty($results) || !$is_one) {
            return $results;
        }
        return $this->type == self::TYPE_ONE ? reset($results) : $results;
    }
1175824
private function getMode($tokens)
    {
        switch ($tokens->getQueryMode()) {
            case 'find':
                return QueryBuilderResult::RESULT_SELECT_MULTIPLE;
            case 'get':
                return QueryBuilderResult::RESULT_SELECT_SINGLE;
            case 'delete':
                return QueryBuilderResult::RESULT_DELETE;
        }

        throw new DslSyntaxException('No query could be built for ' . $tokens->getMethodName() . ': Unknown query mode [' . $tokens->getQueryMode() . ']', DATADO_ILLEGAL_RESULT_MODE);
    }
542526
private function visitQueries(array $queries)
    {
        $result = [];
        foreach ($queries as $query) {
            $result[] = $this->getInterpreter($query)->visit($query);
        }

        return $result;
    }
1085002
public function getFrom()
    {
        $result = [];
        $params = [];

        $refCount = $this->query->aliasRefCount;

        foreach ($this->query->tablesAliasList as $alias) {
            if (!ArrayHelper::getValue($refCount, $alias)) {
                continue;
            }

            try {
                /** @var $from BaseJoin */
                $from = ArrayHelper::getValue(
                    $this->query->tableJoinsMap,
                    $alias,
                    ArrayHelper::STRICT
                );

                list($fromSql, $fromParams) = $this->compile($from);
                array_push($result, $fromSql);

                $params = array_merge($params, $fromParams);
            } catch (KeyError $e) {
                continue;
            }
        }

        return [$result, $params];
    }
1287541
public function query($sql,$parse=false) {
        if(!is_bool($parse) && !is_array($parse)) {
            $parse = func_get_args();
            array_shift($parse);
        }
        $sql  =   $this->parseSql($sql,$parse);
        return $this->db->query($sql);
    }
1349818
public function get(array $columns = ['*']): ResultInterface
    {
        if (empty($columns)) {
            $columns = ['*'];
        }

        $isAllColumns = count($columns) == 1 && isset($columns[0]) && $columns[0] == '*';
        if (!empty($this->className) && $isAllColumns) {
            $columns = $this->getAllFields();
        }

        foreach ($columns as $column => $alias) {
            if (\is_int($column)) {
                $this->select[$alias] = null;
                continue;
            }
            $this->select[$column] = $alias;
        }

        $this->addGetDecorator();

        return $this->execute();
    }
571365
public function get(): \Assurrussa\GridView\Helpers\GridViewResult
    {
        $gridViewResult = $this->_getGridView();
        $gridViewResult->data = $this->pagination->get($this->page, $this->limit);
        $gridViewResult->pagination = $this->_getPaginationRender();
        $gridViewResult->simple = false;

        return $gridViewResult;
    }