Actions
Feature #102194
openPaginator for QueryBuilder
Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2023-10-18
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
Currently there's two Paginators in the core:
- \TYPO3\CMS\Core\Pagination\ArrayPaginator
- \TYPO3\CMS\Extbase\Pagination\QueryResultPaginator
Neither of them is ideal for QueryBuilder results, right?
Sure we could use ArrayPaginator like this:
$query = $queryBuilder->select('*')->from('tt_content'); new ArrayPaginator($query->executeQuery()->fetchAll(), $currentPage, $itemsPerPage);
But this will always fire the whole SELECT statement without any LIMIT to the database.
I suggest to add a 3rd paginator to the core: QueryResultPaginator
Actions