Chaincode queries with couchDB #fabric-chaincode
David Enyeart
The normal CouchDB query syntax is used in Fabric, please see the CouchDB query reference at https://docs.couchdb.org/en/3.1.1/api/database/find.html. Hi, I followed the doc (https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_as_state_database.html ) to create index as below: { "index": { "fields": ["ownerName", "paymentAmountDue"] ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd Hi, I followed the doc (https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_as_state_database.html ) to create index as below: { "index": { "fields": ["ownerName", "paymentAmountDue"] }, "ddoc": "ownerIndexDoc", "name": "ownerIndex", "type": "json" }
|
|
pham.qtpham@...
Hi,
I followed the doc (https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_as_state_database.html ) to create index as below: { "index": { "fields": ["ownerName", "paymentAmountDue"] }, "ddoc": "ownerIndexDoc", "name": "ownerIndex", "type": "json" } Then I use this index to query by using: {"selector":{"ownerName":"Joe","paymentAmountDue": "0"}} It works and the query returns all transactions having ownerName="Joe" and paymentAmountDue = 0. Now I want to query all transactions having ownerName="Joe" and paymentAmountDue <> 0. How can I achieve this? Thx in advance. Trung
|
|