feat(paging): add support for after id parameter in find options #19219
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #19218
This PR adds support for the
after
parameter in theFindOptions
struct.after
is more sympathetic to the structure and interfaces of our K/V store implementations; as opposed tooffset
.The K/V stores we use support
seek
operations to particular keys, but not numerical index offsets like we expose through our APIs.To use this feature for pagination, you simply supply
after
with the last ID observed in a list of results.This PR includes an implementation for
after
in both thetenant
andkv
bucket services.Outstanding:
Figure how widely used the paging links are leveraged and what needs to change to add support for auto-paging links usingafter
.Im going to forgo forcing the use of after via the paging links for now as offset / limit suffice.