You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add XX option to ZRANGE commands for null/empty distinction (valkey-io#2978)
Fixes: valkey-io#2977
Add WITHSTATUS option to ZRANGE, ZREVRANGE, ZRANGEBYSCORE,
ZREVRANGEBYSCORE,
ZRANGEBYLEX, ZREVRANGEBYLEX commands to distinguish between:
Key does not exist (nullarray response)
Key exists but no matching elements (emptyarray response)
In RESP3 mode:
Key not exists: returns _ (nil)
Key exists but empty result: returns *0 (empty array)
In RESP2 mode:
Key not exists: returns *-1 (nil)
Key exists but empty result: returns *0 (empty array)
Maintains backward compatibility
This addresses the need to differentiate between "key not found" vs "no
results found"
scenarios in client applications.
---------
Signed-off-by: youngmore1024 <youngmore1024@outlook.com>
Signed-off-by: Jacob Murphy <jkmurphy@google.com>
Co-authored-by: Jacob Murphy <jkmurphy@google.com>
Co-authored-by: Ran Shidlansik <ranshid@amazon.com>
0 commit comments