convector
convector copied to clipboard
Pagination Functionality
The problem
Hyperledger Fabric recently added the pagination feature. So, is it possible to add this feature to convector as pagination is very necessary for production level deployment.
Environment
- Convector version (or git revision) that exhibits the issue:
- Last Convector version that did not exhibit the issue (if applicable):
- OS/version:
- Node.js version:
- Npm or Yarn package manager:
- Convector CLI version (if applicable):
- Hurley CLI version (if applicable):
Details
Current Behavior
Explain what the current behavior is
Expected Behavior
Explain what you were expecting to happend instead
Code To Reproduce Issue [ Good To Have ]
Please remember that with sample code it's easier to reproduce the bug and it's much faster to fix it.
Use convector-cli if possible as the base to reproduce the issue
Convector doesn't have an explicit API for doing this. But given the nature of Convector, you can do this inside a controller function by doing this.tx.stub.getStub().getQueryResultWithPagination(...)
. This is a call to the Fabric Shim API https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html#getQueryResultWithPagination__anchor
We might add some shortcuts inside the models in the future, we're always happy to get community PRs for things like this :)