Skip to content

Keyset paginator for multiple AR::Relations

Adam Hegyi requested to merge multi-scope-keyset-pagination into master

What does this MR do?

This MR extends the keyset pagination library to support ordering two or more ActiveRecord scopes at the same time which could be used with sharded database tables.

To share as much code as possible, the core logic was extracted from the Paginator class into the Paginatable concern which is used by both Paginator and MultiScopePaginator classes.

The MR also includes documentation for the keyset pagination with a section about the MultiScopePaginator.

Note: There is no user-facing change in this MR

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Adam Hegyi

Merge request reports