-
Notifications
You must be signed in to change notification settings - Fork 12
Chaincode Pagination with query[Asset]s. #131
Conversation
99cb2b2
to
a1a9978
Compare
2af5e83
to
d5139b0
Compare
@Kelvin-M I moved to a simpler For the I also made sure smart contracts that support bookmarks always return a bookmark in the chaincode response: {
result interface{}
bookmark string
} even when the bookmark is Lastly I added 2 unit tests:
I had to make changes to the mock stub to support pagination. Please let me know if all that looks good to you. |
d5139b0
to
373fbb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few feedback but feel free to ignore them.
Nice to see the start of pagination.
if len(args) > 1 { | ||
err = errors.BadRequest("incorrect number of arguments, expecting at most one argument") | ||
return | ||
} | ||
elementsKeys, err := db.GetIndexKeys("aggregateAlgo~owner~key", []string{"aggregateAlgo"}) | ||
|
||
if len(args) == 1 && args[0] != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here and others following that I will not comment on.
373fbb4
to
61da986
Compare
Description
The aim of this PR is to add chaincode pagination for query[Asset]s.
It's based on :
Closes issue(s)
None
Companion PRs
Substra/substra-backend#352
How to test / repro
Launch e2e tests, no regression should appear.
Screenshots / Trace
None
Changes include
GetStateByPartialCompositeKeyWithPagination
instead ofGetStateByPartialCompositeKey
Checklist
Other comments