Skip to main content

Arguments

string
required
The key of the sorted set.
boolean
Only update elements that already exist. Never add elements.
boolean
Only add new elements. Never update elements.
boolean
Return the number of elements added or updated.
boolean
When this option is specified ZADD acts like ZINCRBY. Only one score-element pair can be specified in this mode.
boolean
Only update existing elements if the new score is greater than the current score. Add element without a check if it does not exist.
boolean
Only update existing elements if the new score is less than the current score. Add element without a check if it does not exist.

Response

The number of elements added to the sorted sets, not including elements already existing for which the score was updated.If ch was specified, the number of elements that were updated.If incr was specified, the new score of member.