Skip to content
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

ZRANGE / ZREVRANK add withscore option support #1607

Merged
merged 8 commits into from
Jul 29, 2023

Commits on Jul 25, 2023

  1. ZRANGE / ZREVRANK add withscore option support

    Add an option "withscores" to ZRANK and ZREVRANK.
    The syntax are:
    ```
    zrank key member [WITHSCORE]
    zrevrank key member [WITHSCORE]
    ```
    
    With this option, will additionally return the member's score,
    in the form of an array.
    ```
    127.0.0.1:6666> zadd zset 1 a 2 b 3 c
    (integer) 3
    127.0.0.1:6666> zrank zset b withscore
    1) (integer) 1
    2) "2"
    127.0.0.1:6666> zrevrank zset c withscore
    1) (integer) 0
    2) "3"
    ```
    
    This option was added in Redis 7.2
    enjoy-binbin committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    1269928 View commit details
    Browse the repository at this point in the history
  2. format the code

    enjoy-binbin committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    b30658a View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. Configuration menu
    Copy the full SHA
    a7f1f18 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2023

  1. Configuration menu
    Copy the full SHA
    bf136e0 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2023

  1. Configuration menu
    Copy the full SHA
    e407a82 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    af0e6e2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    00c354a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2f7641e View commit details
    Browse the repository at this point in the history