简体   繁体   English

如何在 IBM vs Code chaincode for fabric 上应用分页?

[英]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.

相关问题 IBM Blockchain Platform如何初始化链码? 超级账本面料 - How IBM Blockchain Platform initializing chaincode? Hyperledger Fabric 如何将 Go 客户端应用程序连接到 IBM VS Code Fabric 扩展? - How to connect a Go client application to the IBM VS Code Fabric Extension? hyperledger composer中的chaincode与hyperleger结构中的chaincode? - chaincode in hyperledger composer vs chaincode in hyperleger fabric? 在Hyperledger Fabric中,如何在部署时保持链代码(源代码)的私密性? - In Hyperledger Fabric, how to keep chaincode(source code) private at the time of deployment? 如何更新Hyperledger Fabric中的链码? - How to update the chaincode in Hyperledger Fabric? 如何在Fabric中查找chaincode ID? - How to find chaincode id in fabric? 如何在Fabric chaincode中授权用户? - How to authorise user in fabric chaincode? 使用 IBM Blockchain Platform 在 VS 代码中创建 Fabric 环境时出错 - error creating Fabric environment in VS code with IBM Blockchain Platform Hyperledger Fabric Go Chaincode - 在链码代码中签名 - Hyperledger Fabric Go Chaincode - Signing inside chaincode code IBM hyperlegder Fabric Bluemix实现-部署Chaincode时出错 - IBM hyperlegder Fabric Bluemix implementation - errror when deploying chaincode
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM