@param $queryRow

@return \Concrete\Core\Page\Page
175689
public function getResult($queryRow)
    {
        $c = Page::getByID($queryRow['cID'], 'ACTIVE');
        if (is_object($c) && $this->checkPermissions($c)) {
            if ($this->pageVersionToRetrieve == self::PAGE_VERSION_RECENT) {
                $cp = new \Permissions($c);
                if ($cp->canViewPageVersions() || $this->permissionsChecker === -1) {
                    $c->loadVersionObject('RECENT');
                }
            } elseif ($this->pageVersionToRetrieve == self::PAGE_VERSION_SCHEDULED) {
                $cp = new \Permissions($c);
                if ($cp->canViewPageVersions() || $this->permissionsChecker === -1) {
                    $c->loadVersionObject('SCHEDULED');
                }
            } elseif ($this->pageVersionToRetrieve == self::PAGE_VERSION_RECENT_UNAPPROVED) {
                $cp = new \Permissions($c);
                if ($cp->canViewPageVersions() || $this->permissionsChecker === -1) {
                    $c->loadVersionObject('RECENT_UNAPPROVED');
                }
            }
            if (isset($queryRow['cIndexScore'])) {
                $c->setPageIndexScore($queryRow['cIndexScore']);
            }

            return $c;
        }
    }
1133955
public function loadFromRow($row)
    {
        // Loop over the columns, sanitise and store it into the new properties of this object.
        foreach ($row as $column => &$value) {
            // Only save columns beginning with a normal letter.
            if (preg_match('/^[a-z]/i', $column)) {
                $this->$column = & $value;
            }
        }
        $this->postConstruct();
        if (DatabaseLayer::getInstance()->useCache() && $this->_caching_enabled) {
            $cache = DatabaseLayer::getInstance()->getCache();
            $cache->save($this->getCacheIdentifier(), serialize($this));
        }
        return $this;
    }
476283
public function buildQuery(QueryAbstract $query)
    {
        $queryParts = $query->getQueryParts();
        return implode(
            ' ',
            array_filter(
                [
                    $queryParts['type'],
                    $this->getFields($queryParts),
                    $this->getTable($queryParts),
                    $this->getSet($queryParts),
                    $this->getValues($queryParts),
                    $this->getJoins($queryParts),
                    $this->getWhere($queryParts),
                    $this->getGroup($queryParts),
                    $this->getOrder($queryParts),
                    $this->getLimit($queryParts)
                ],
                function ($var) {
                    return $var !== null;
                }
            )
        );
    }
80553
public function setPaginationFromQuery(SQLSelect $query)
    {
        if ($limit = $query->getLimit()) {
            $this->setPageLength($limit['limit']);
            $this->setPageStart($limit['start']);
            $this->setTotalItems($query->unlimitedRowCount());
        }
        return $this;
    }
1069276
func (p *ConnPool) QueryRow(sql string, args ...interface{}) *Row {
	rows, _ := p.Query(sql, args...)
	return (*Row)(rows)
}
702105
public function getCurrentPage()
    {
        $page = $this->getRequest()->query->getInt($this->getActionQueryParameter(static::QUERY_PARAMETER_PAGE), 1);
        if ($page < 1) {
            $page = 1;
        }
        return $page;
    }
530748
function page($page, $limit = null, $offset = 0) {
		if ($page === null || $limit === null) {
			// retrieve all rows
			$this->num(':offset', $offset);
			$this->num(':count', PHP_INT_MAX);
		}
		else { // $page != null
			$this->num(':offset', $limit * ($page - 1) + $offset);
			$this->num(':count', $limit);
		}

		return $this;
	}
810181
protected function _getRowByParentRow($parentRow)
    {
        if ($parentRow && $this->_model instanceof Kwf_Model_Field) {
            $ret = $this->_model->getRowByParentRow($parentRow);
        } else {
            $ret = $this->getRow($parentRow);
        }
        if (is_null($ret)) return $ret;
        return (object)$ret;
    }
154752
protected function pager()
    {
        if ($this->pager === null) {
            $this->pager = $this->createPagination();
        }

        return $this->pager;
    }
130661
public function createPager(QueryBuilder $qb, Request $request)
    {
        // Too bad we can't use the Sidus/FilterBundle DoctrineORMAdapter instead but it's not a dependency
        $pager = new Pagerfanta(new DoctrineORMAdapter($qb, false));
        /** @noinspection ExceptionsAnnotatingAndHandlingInspection */
        $pager->setMaxPerPage(10);
        try {
            $pager->setCurrentPage($request->get('page', 1));
        } catch (NotValidCurrentPageException $e) {
            // Silence exception, fallback to first page
        }

        return $pager;
    }
1073097
public function addPaginationToQuery($query = [])
    {
        if ($this->listLimit !== null) {
            $query['limit_rows'] = $this->listLimit;
        }

        if ($this->listOffset !== null) {
            $query['limit_offset'] = $this->listOffset;
        }

        return $query;
    }
363383
public function addLocalizedPagesToCache($pageRow)
    {
        // create entry in cachedPageRecods for default language
        $this->cachedPageRecords[0][$pageRow['uid']] = $pageRow;

        // create entry in cachedPageRecods for additional languages, skip default language 0
        foreach ($this->sysLanguages as $sysLang) {
            if ($sysLang['uid'] > 0) {

                // check for unified page translation handling feature
                // see https://docs.typo3.org/typo3cms/extensions/core/Changelog/9.0/Breaking-82445-PagesAndPageTranslations.html
                if (GeneralUtility::makeInstance(Features::class)->isFeatureEnabled(
                    'unifiedPageTranslationHandling'
                )) {
                    $queryBuilder = Db::getQueryBuilder('pages');
                    list($pageOverlay) = $queryBuilder
                        ->select('*')
                        ->from('pages')
                        ->where(
                            $queryBuilder->expr()->eq(
                                'l10n_parent',
                                $queryBuilder->quote($pageRow['uid'], \PDO::PARAM_INT)
                            ),
                            $queryBuilder->expr()->eq(
                                'sys_language_uid',
                                $queryBuilder->quote($sysLang['uid'], \PDO::PARAM_INT)
                            )
                        )
                        ->execute()
                        ->fetchAll();
                } else {
                    // use fallback for translated pages in "pages_language_overlay"
                    $queryBuilder = Db::getQueryBuilder('pages_language_overlay');
                    list($pageOverlay) = $queryBuilder
                        ->select('*')
                        ->from('pages_language_overlay')
                        ->where(
                            $queryBuilder->expr()->eq(
                                'pid',
                                $queryBuilder->quote($pageRow['uid'], \PDO::PARAM_INT)
                            ),
                            $queryBuilder->expr()->eq(
                                'sys_language_uid',
                                $queryBuilder->quote($sysLang['uid'], \PDO::PARAM_INT)
                            )
                        )
                        ->execute()
                        ->fetchAll();
                }

                if ($pageOverlay) {
                    $this->cachedPageRecords[$sysLang['uid']][$pageRow['uid']] = $pageOverlay + $pageRow;
                }
            }
        }
    }
645240
public function extractUrlWildcardFromRow(array $row)
    {
        $urlWildcard = new UrlWildcard();

        $urlWildcard->id = (int)$row['id'];
        $urlWildcard->destinationUrl = $this->cleanUrl($row['destination_url']);
        $urlWildcard->sourceUrl = $this->cleanUrl($row['source_url']);
        $urlWildcard->forward = (int)$row['type'] === 1;

        return $urlWildcard;
    }
675321
public function getPageCanonicalURL($page, $querystring = null)
    {
        $result = null;
        if ($page) {
            if ($this->valn->integer($page, 1)) {
                $page = Page::getByID($page);
            }
            if ($page instanceof Page && !$page->isError()) {
                $cID = $page->getCollectionID();
                $originalCID = $page->getCollectionPointerOriginalID();
                if (!empty($originalCID) && $originalCID != $cID) {
                    $result = $this->getPageCanonicalURL($cID, $querystring);
                } else {
                    $result = $this->resolver->resolve([$page]);
                    $query = null;
                    if ($querystring instanceof Query) {
                        $query = clone $querystring;
                    } elseif ($querystring instanceof Request) {
                        $query = new Query($querystring->query->all());
                    } elseif ($querystring instanceof ParameterBag) {
                        $query = new Query($querystring->all());
                    } elseif (is_array($querystring)) {
                        $query = new Query($querystring);
                    } elseif (is_string($querystring)) {
                        if ($querystring !== '') {
                            $query = new Query($querystring);
                        }
                    }
                    if ($query !== null && $query->count() > 0) {
                        foreach ($this->excludedQuerystringParameters as $qp) {
                            $query->offsetUnset($qp);
                        }
                        $result = $result->setQuery($query);
                    }
                }
            }
        }

        return $result;
    }
1371795
public function searchRouteAction( $context )
    {
        /** @var SearchAdapter $searchAdapter */
        $searchAdapter = $this->get('netgen_search_and_filter.route_'.$context);

        /** @var Form $form */
        $form = $searchAdapter->getForm();

        $response = new Response();

        $pager = new Pagerfanta( $searchAdapter );
        $pager->setMaxPerPage( $searchAdapter->getPageLimit() );

        $showResults = $this->getPage( $pager, $form );

        $request = $this->container->get('request');

        return $this->render($searchAdapter->getResultTemplate(), array(
            'pagelayout' => $this->container->getParameter("netgen_search_and_filter.main_pagelayout"),
            'route' => $request->get('_route'),
            'context' => $context,
            'form_template' => $searchAdapter->getFormTemplate(),
            'form' => $form->createView(),
            'pager' => $pager,
            'show_results' => $showResults,
            'query_string' => array($form->getName() => $form->getData()),
            'current_locale' => $this->getConfigResolver()->getParameter('RegionalSettings.Locale')
        ), $response);
    }
637537
public Page<T> page(String sql, List<Object> paramValues, PageRow pageRow) {
        return this.page(sql, paramValues.toArray(), pageRow);
    }
342498
protected function makeCursor(Query $query, $row)
    {
        $fields = [];
        foreach ($query->orders() as $order) {
            $fields[$order->column()] = $this->field($row, $order->column());
        }
        return $fields;
    }