-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
New ZADD Options #1067
Comments
@jamespedwards42 I've read ZADD page from Redis doc. now, and feel that we can't add INCR option with current way cause return type should be changed to Double. ZADD with INCR option is same to ZINCRBY, so I'd like to not supporting it. Answering your last question, sure it is NOT desired to add a new method interface for every combination of options. |
@HeartSaVioR I guess we can include it after #878 has been merged. In the mean time I guess ZINCRBY pretty much is the same thing right?. @jamespedwards42 what do you think?. Is there a reason you need to explicitly use ZADD with INCR option instead of ZINCRBY? |
@marcosnils ZADD with INCR option can be used with NX / XX option, which ZINCRBY is not supported. |
@xetorthio @marcosnils @jamespedwards42 I posted this issue and alternative way to Redis user mailing groups. |
@marcosnils |
@HeartSaVioR I guess it makes sense. Let's wait to see if we get any feedback in the redis groups and decide what to do about this. |
@HeartSaVioR @marcosnils |
@jamespedwards42 @marcosnils I know that |
Posted this issue to Github issue, too. |
Hmm... Now I don't expect antirez changes his mind. @jamespedwards42 @marcosnils What do you think? |
I think it makes perfect sense to put it under zincrby(). ...Just mentioning because I didn't notice it in the rest of the conversation, the CH option would also be applicable to use in conjunction with the INCR option. |
@jamespedwards42
|
Ah yea, that makes sense anyways considering you can only use INCR with one score-element pair and therefore already know it will change. |
@jamespedwards42 Yes, right. |
@jamespedwards42 @marcosnils |
@HeartSaVioR let's do that, let's only call ZADD + INCR when NX / XX is set in the zincrby method. |
@marcosnils OK! I'll take care of it. Actually I'm working on it. :) |
@HeartSaVioR it'd be great if you could add to the javadoc that the command is supported from redis 3.0.1 onwards |
@marcosnils OK. I'll add it. |
@jamespedwards42 @marcosnils |
Redis recently added new options to the ZADD command as of 3.0.2. Is anyone already planning on adding these? I took a look at it, but it gets a bit hairy because the INCR option changes the return data type... Is it desired to add a new method interface for every combination of options?
The text was updated successfully, but these errors were encountered: