Refactor pagination helper (extract classes, remove keyset pagination)
What does this MR do?
This MR refactors API::Helpers::Pagination
:
- Extract offset based pagination strategy into its own class
- Remove keyset based pagination strategy (never matured enough, we are going to approach this differently soon)
- Change
Gitlab::Serializer::Pagination
(which is used by regular controllers) to not use the API helper, but instead use the extracted pagination classOffsetPagination
The last point is a preparation to be able to focus on the API only when adding proper keyset pagination support. We may want to use that across the board later, but for now it's API-only: #32186 (closed)
This MR is a refactoring only. The next step is to instrument the API pagination (offset strategy, API-only) in #34011 (closed).
Conformity
-
Changelog entry - not needed, refactoring
Edited by 🤖 GitLab Bot 🤖