Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: support for cursors on store API #1024
feat!: support for cursors on store API #1024
Changes from all commits
0169a0c
69b64af
f3635f1
1a5a57f
8f243eb
c012748
4e730ef
a49786f
9613e9c
5c41180
0f73c0f
0627a80
0e0660f
100eb4c
9f04932
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
non-blocking: did you consider not allowing
startTime
andendTime
ifcursor
set? Could be worth ensuring with a type.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.
good idea 👍 @danisharora099
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.
We mean accepting either the
timeFilter
or thecursor
arg here?cc @felicio
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.
Yeah, but I saw the @LNSD's comment about it being allowed since then, which made me reconsider.
@LNSD thanks for the great summary at waku-org/nwaku#1400 (comment). Please,
senderTime
for clients?senderTime
,digest
andpubsubTopic
be actually required, and not optional, fields for clients?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.
non-blocking: Did you find the answer to why the cursor was implemented as an object and not a string/hash?
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.
It does contain a digest. At the end of the day, it matches the protobuf interface. I think the inner work of the
Index
type should be a black box for the API consumer:createCursor
and getsomething
something
to the store queryIf you have an idea how to improve the API, please do.
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.
I had discussed this with @jm-clius earlier and there is indeed an ideal way possible to have the entire arg as a digest of all the 4 fields.
This is simply a design that was implemented earlier and could be changed in the future.
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.
Cc @LNSD
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.
FYI: I plan to simplify the current protocol as part of the nwaku v0.14.0 release. And streamline the cursor handling is one of the reasons behind this protocol overhaul.