Reputation: 452
I am using the Hyperledger fabric V0.6 service in IBM-bluemix and deployed my go language chaincode to the peer as provided in the bluemix documentation.
Since I am very new to this implementation, I could find only the PutState and GetState methods there in ChaincodeStubInterface.
But my requirement is to query the states for a period of time.
eg:
11-Feb-2017 10:00:00 : created Asset1
11-Feb-2017 12:00:00 : created Asset2
12-Feb-2017 10:00:00 : Modified Asset1
13-Feb-2017 13:00:00 : Created Asset3
....
15-Feb-2017 14:00:00 : Created AssetN
Now I want to query the states for the range 12-Feb-2017 00:00:00 to current timestamp. I have gone through lots of documentations but I didn't find any solution for this.
How can I get this data? Thanks in advance.
Upvotes: 0
Views: 464
Reputation: 4037
The v0.6 implementation of Hyperledger Fabric does not include such function. The Hyperledger community recently published v1.0.0 of Hyperledger Fabric, which will also soon be available on IBM Bluemix that increases the capabilities of chaincode and the ledger. However, it does not to my knowledge provide a means of querying the ledger within a range of dates. It does provide a means of iterating over a range of blocks given a starting and ending keys.
Upvotes: 1