-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for list pagination in list capability invocations (#…
…184) Adds support for list pagination in `store/list` and `upload/list`. Relevant notes on decisions made: - unfortunately, Databases like DynamoDB does not support pagination by just giving `pageNumber` and `size`. Aiming to have something generic (that works in DynamoDB, but also other DBs), chosen approach is to rely on `cursor` and `size` . - at first, attempted to make `cursor` a Link property of the capability. And it worked well for `store/list`, but then I got to use cases (`upload/list` for instance) where it cannot be a link. This is because Upload Table primary key contains `${dataCid}#${carCid}` to be unique. So, in this case that is the cursor we need to have. There might be other kind of use cases, so having this as string is really the most flexible approach to support pagination. BREAKING CHANGE: store/list and upload/list types now require nb object with optional properties
- Loading branch information
1 parent
38228bc
commit ced23db
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters