stable ordering
An order of results that is the same every time the same request is made, which pagination depends on.
In more detail
If the default order is left implicit, the database may choose a different plan and return a different page for an identical request. Document a default order and always finish it with a unique tie breaker.
Related terms
- tie breaker — A final unique field, usually the identifier, added to a sort order so items with equal values always come out in the same order.
- sort key — The field a collection is ordered by, chosen by the client from a small documented list, such as sort=title or sort=-id for descending.
- deterministic — Always producing the same result from the same inputs, with nothing left to chance or timing.
Taught in
- Pagination Strategies — Modern API Architecture: REST, GraphQL & gRPC
- Sorting Results — Modern API Architecture: REST, GraphQL & gRPC