Feature #102194
closedPaginator for QueryBuilder
0%
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
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81447
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81447
Updated by Bastian Stargazer about 1 year ago
Will this feature patch also be available in v11? That would be awesome!
Updated by Stefan Bürk about 1 month ago
- Status changed from Under Review to Rejected
Rejectiong this request as "Won't do" as this is currently not doable in a working way,
at least as a generic overall solution which TYPO3 should strive for.
See comments in the provided change, but the current solution
lacks support for two major things:
- Full record language overlay handling
- Full workspace support (moved,deleted,added in workspace, resorted, ...)
That means the plain QueryBuilder paginator could only be used in single language (default)
instance without workspaces and is not reliable in instances using one or both and leading
to a fallout of upcoming multipe issues targeting the missing support and asking why it
does not automatically resolve these things.
I don't see any easy way to implement this in a satisfing way even with a lot of time investment
plus the time required to deal with the following issue reports.
I'd suggest to provide this paginator implementation as a dedicated extension mentioning the restriction.