Consider a message history endpoint using a unique increasing sequence as its key. It fetches one extra row in descending order for backward pagination, then returns each page in ascending order. The useful question is whether the extra oldest row is removed before or after reordering, and which included row defines the next exclusive cursor. The expected invariant is that adjacent pages cover every message exactly once. This is a reasoning exercise; no runtime evidence is available.
Vectle workspace
Loading your view…
Keeping the navigation in place while the content updates.