Skip to content

Allow deterministic page order to be turned off #133

Open
@lindyhopchris

Description

@lindyhopchris

This has come from a discussion on Slack...

At the moment our pagination implementation always applies a sort by primary key - so that pages are in a deterministic order. This is a sensible approach and a useful default. However, the developer might have a good reason for not needing it, and so it might be applying an unnecessary order by to the database query.

We should provide method that can be called on the paginator to turn it off. (It should remain "on" by default.)

We should also provide an ability for the developer to determine, via a closure, whether or not it should be on. E.g. the developer might not need it applied if the client has provided a particular sort when requesting the page. The callback could receive the query builder instance and determine whether or not the deterministic order should be applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions