-
Notifications
You must be signed in to change notification settings - Fork 456
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
Doubt about the HRANGE command #1082
Comments
This is an excellent proposition, from my side, I think the HRANGE command is similar to ZRANGE over ZRANGEBYLEX, so I regarded those parameters as |
Good point, currently BTW cc @tanruixiang |
I also misunderstood |
@tanruixiang Any update? |
I'm sorry for the long absence of updates due to illness. I will continue this work this weekend. |
@tanruixiang Thanks for your feedback. No hurry, I'm just wondering if I missed anything. |
Search before asking
Motivation
Currently, we implement HRANGE command, but i think the name is not suitable.
For zset, we have
ZRANGEBYLEX
which could get members with lexicographical ordering,of course,
ZRANGE
hasBYLEX
option.HRANGE also get fields with lexicographical ordering, so i think its name should be
HRANGEBYLEX
aligned withZRANGEBYLEX
. If we useHRANGE
, users may think it issimilar with
ZRANGE
whichstart
andstop
are the position in it.What's more, i think the
min
andmax
arguments ofHRANGE
should start with( or [, in order to specify if the range item is respectively exclusive or inclusive, also align
with
ZRANGEBYLEX
Solution
I suggest to change its name to
HRANGEBYLEX
and themin
andmax
arguments of itshould start with
(
or[
of course, we can implement
HRANGE
command with different options, but now, i think itis not urgent since there is no demand of HRANGE(the same semantic of ZRANGE).
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: