Tools, FAQ, Tutorials:
Hyperledger Composer Access Query File
What Is Hyperledger Composer Query File (*.qry)?
✍: FYIcenter.com
A Hyperledger Composer Query file
is a source code file that define queries to
retrieve business objects from the Business Network.
A access control file uses the Query language and the .qry file extension. Here is an example of an query file from the Fund Clearing Network, queries.qry:
/**
* Queries for Fund Clearing
*/
query TransferRequestsByBankInState {
description: "Select all TransferRequests for a participating bank in a given state"
statement:
SELECT org.clearing.TransferRequest
WHERE (fromBank == _$bank)
}
query TransferRequestsByBanksInState {
description: "Select all TransferRequests for a participating bank in a given state"
statement:
SELECT org.clearing.TransferRequest
WHERE ((fromBank == _$bank1 AND toBank == _$bank2 AND state == _$state) OR (fromBank == _$bank2 AND toBank == _$bank1 AND state == _$state))
}
query BatchTransferRequestById {
description: "Select a BatchTransferRequest by the UUID"
statement:
SELECT org.clearing.BatchTransferRequest
WHERE (_$batchId == batchId)
}
query BatchTransferRequestsByBankInState {
description: "Select all BatchTransferRequests in a given state for a participating bank"
statement:
SELECT org.clearing.BatchTransferRequest
WHERE ((parties CONTAINS _$party) AND (state == _$state))
}
query BatchTransferRequestForBanksInState {
description: "Select all BatchTransferRequests in a given state for two participating banks"
statement:
SELECT org.clearing.BatchTransferRequest
WHERE ((parties CONTAINS [_$bank1, _$bank2]) AND (state == _$state))
}
Â
⇒ Business Network Archive (BNA) File
⇠Hyperledger Composer Access Control File
2020-11-22, ∼1736🔥, 0💬
Popular Posts:
What is Fabric CA (Certificate Authority)? Fabric CA (Certificate Authority) is a component of Hyper...
Where to get a JSON.stringify() Example Code in JavaScript? Here is a good JSON.stringify() example ...
How to use "xsl-transform" Azure API Policy Statement? The "xsl-transform" Policy Statement allows y...
How to Install Docker Desktop 2.5.0 on Windows 10? You can follow this tutorial to Install Docker De...
How to create a VC# class and build it into a library? If you want to create a VC# class and build i...