Support for NX/XX/CH/INCR options to ZADD
See original GitHub issueRedis 3.0.2+ support NX, XX, CH, and INCR options to the ZADD command: http://redis.io/commands/zadd#zadd-options-redis-302-or-greater
It doesn’t seem (from the docs, at least) that redis-py supports these options.
Are you interested in supporting them? Should I bother with a pull request to implement support?
The one API issue is that the use of kwargs in the existing zadd API makes it a bit confusing where to add these options in the API with backward-compatibility. Any thoughts on that?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:13
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Support for NX/XX/CH/INCR options to ZADD #649 - GitHub
Redis 3.0.2+ support NX , XX , CH , and INCR options to the ZADD command: http://redis.io/commands/zadd#zadd-options-redis-302-or-greater.
Read more >ZADD - Redis
ZADD supports a list of options, specified after the name of the key and before the first score argument. Options are: XX: Only...
Read more >Spring data redis zadd command missed nx|xx|incr options
It seem that the only two zadd methods that DefaultZSetOperations provide can't let me use NX|XX|CH|INCR options: Boolean add(K key, V value, ...
Read more >How To Manage Sorted Sets in Redis - DigitalOcean
Creating Sorted Sets and Adding Members · NX or XX : These options have opposite effects, so you can only include one of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You can monkey patch in this functionality:
I really think this should be updated even if it breaks backwards compatibility because nx and xx settings are very important in set operations.
Hey Carl, good to hear from you.
Ya, the
kwargsissue is why I haven’t already implemented this. There’s a pull request (#638) that implemented each option as a separate command, but that means you can’t mix options together.My current thought is that the existing API sucks (using
kwargs) and instead should just take adictof items along with separate arguments for these options. This unfortunately breaks exiting code and I’ve been reluctant to bite the bullet.It’s becoming clearer that it’s time for redis-py 3.0 where I can fix some of these issues without worrying as much about breaking things.