-
Notifications
You must be signed in to change notification settings - Fork 65
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
Go: ZRANGE #2925
Go: ZRANGE #2925
Conversation
Signed-off-by: Yury-Fridlyand <[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.
LGTM
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
@@ -1476,6 +1476,36 @@ func (client *baseClient) BZPopMin(keys []string, timeoutSecs float64) (Result[K | |||
return handleKeyWithMemberAndScoreResponse(result) | |||
} | |||
|
|||
// TODO rework once we get other handlers - return `[]string` | |||
func (client *baseClient) ZRange(key string, rangeQuery options.ZRangeQuery) ([]Result[string], error) { |
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.
In most places, we have passed options as a pointer. Is there any difference?
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.
rangeQuery
is a mandatory argument for that command
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 once comments addressed.
// // `result` contains members with scores within the range of negative infinity to 3, in descending order | ||
// | ||
// [valkey.io]: https://valkey.io/commands/zrange/ | ||
ZRangeWithScores(key string, rangeQuery options.ZRangeQueryWithScores) (map[Result[string]]Result[float64], error) |
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.
Can the map key be nil
? If not then this should be `map[string]Result[float64].
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.
Never. This will be updated in another PR for all commands.
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.
Conditional approval
Signed-off-by: Yury-Fridlyand <[email protected]>
Issue link
This Pull Request is linked to issue (URL): #2878
Checklist
Before submitting the PR make sure the following are checked: