-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add noscores option to command ZSCAN. (#324)
Command syntax is now: ``` ZSCAN key cursor [MATCH pattern] [COUNT count] [NOSCORES] ``` Return format: ``` 127.0.0.1:6379> zadd z 1 a 2 b 3 c (integer) 3 127.0.0.1:6379> zscan z 0 1) "0" 2) 1) "a" 2) "1" 3) "b" 4) "2" 5) "c" 6) "3" 127.0.0.1:6379> zscan z 0 noscores 1) "0" 2) 1) "a" 2) "b" 3) "c" ``` when NOSCORES is on, the command will only return members in the zset, without scores. For client side parsing the command return, I believe it is fine as long as the command is backwards compatible. The return structure are still lists, what has changed is the content. And clients can tell the difference by the subcommand they use. Since `novalues` option of `HSCAN` is already accepted (redis/redis#12765), I think similar thing can be done to `ZSCAN`. --------- Signed-off-by: Chen Tianjie <[email protected]>
- Loading branch information
1 parent
6e7af94
commit ba9dd7b
Showing
4 changed files
with
51 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters