Closed DCNick3 closed 1 month ago
How this will work for SDKs?
To get total amount of items in the query they need to add number of remaining items (from the remaning
field) + size of current batch?
To get total amount of items in the query they need to add number of remaining items (from the remaning field) + size of current batch?
Yes, this is what rust SDK is also doing
Context
This PR allows the client to inspect the amount of items that is returned by the query without requesting all batches.
Closes #4984
Solution
ExactSizeIterator
implementation applied to the pagination combinator. Filtering is not a problem, because we currently eagerly collect all items into a vector before returning anything.ExactSizeIterator
onQueryIterator
pretty naturally.Checklist
CONTRIBUTING.md
.