-
Notifications
You must be signed in to change notification settings - Fork 53
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
Node: Add XRANGE command #2069
Node: Add XRANGE command #2069
Conversation
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
node/src/BaseClient.ts
Outdated
* ```typescript | ||
* await client.xadd("mystream", [["field1", "value1"]], {id: "0-1"}); | ||
* await client.xadd("mystream", [["field2", "value2"], ["field2", "value3"]], {id: "0-2"}); | ||
* const result = await client.xrange("mystream", "-", "+"); |
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.
* const result = await client.xrange("mystream", "-", "+"); | |
* console.log(await client.xrange("mystream", "-", "+")); |
node/src/Transaction.ts
Outdated
* See https://valkey.io/commands/xrange for more details. | ||
* | ||
* @param key - The key of the stream. | ||
* @param start - The starting stream ID bound for the range. |
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.
mention what id
is for the range bound?
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.
looks good with Andrew's comments addressed
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
You need to reflect this in docs and in tests |
Well this is getting kind of frustrating. I'm following the Python tests and there's two things that stand out to me. They use numbers for timestamps for one thing, which apparently isn't how they're specified according to your previous comment. Secondly, this check for the Redis version isn't actually in the Python xrange tests at all. |
…ion to xrange tests Signed-off-by: Jonathan Louie <[email protected]>
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.
Nice!
Please, polish the docs and go on.
Signed-off-by: Jonathan Louie <[email protected]>
node/src/BaseClient.ts
Outdated
* ```typescript | ||
* await client.xadd("mystream", [["field1", "value1"]], {id: "0-1"}); | ||
* await client.xadd("mystream", [["field2", "value2"], ["field2", "value3"]], {id: "0-2"}); | ||
* console.log(await client.xrange("mystream", "-", "+")); |
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.
Please update the example to use the enum properly.
node/src/BaseClient.ts
Outdated
* - Use `InfBoundary.PositiveInfinity` to end with the maximum available ID. | ||
* @param count - An optional argument specifying the maximum count of stream entries to return. | ||
* If `count` is not provided, all stream entries in the range will be returned. | ||
* @returns A map of stream entry ids, to an array of entries. |
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.
Tell when it return null
.
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.
https://github.com/valkey-io/valkey-glide/pull/1920/files I guess this should've added documentation for the Java client about the null case when it was fixed? It certainly doesn't seem to be there right now on main.
*/ | ||
export type ScoreBoundary<T> = | ||
export type Boundary<T> = |
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.
❤️
Signed-off-by: Jonathan Louie <[email protected]>
https://valkey.io/commands/xrange/