[英]How to apply a pagination on IBM vs code chaincode for fabric?
I'm using an IBM-Blockchain platform VS code extension for one of my POC development.我正在为我的POC开发之一使用IBM-Blockchain 平台 VS 代码扩展。 I want pagination on the Query function in fabric.
我想在织物中对查询 function 进行分页。 Here is my demo example:
这是我的演示示例:
let queryString =
{
"selector": {
"isLink": isLink,
"f_id":f_id
}
}
How can I put pagination (like when 5 data comes on the first page and then continue like another page) on this chaincode selector query which is created on the IBM-Blockchain platform?如何在 IBM-Blockchain 平台上创建的这个链码选择器查询上放置分页(比如当 5 个数据出现在第一页然后像另一页一样继续)? Can anyone help me?
谁能帮我?
Thanks.谢谢。
pagination is done using a pagination api, so suggest you take a look here https://hyperledger.github.io/fabric-chaincode-node/release-1.4/api/fabric-shim.ChaincodeStub.html#getQueryResultWithPagination__anchor For the api reference. pagination is done using a pagination api, so suggest you take a look here https://hyperledger.github.io/fabric-chaincode-node/release-1.4/api/fabric-shim.ChaincodeStub.html#getQueryResultWithPagination__anchor For the api reference . Sorry I don't know if there is any example of use of this in any of the fabric samples, if not then hopefully there are some examples in the test suite for fabric-chaincode-node on github.
抱歉,我不知道在任何织物样本中是否有任何使用此示例的示例,如果没有,那么希望 github 上的织物链代码节点的测试套件中有一些示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.