kevy4.0

ZADD

Add members with scores to a sorted set, with conditional flags.

ZADD key [NX|XX] [GT|LT] [CH] [INCR] score member [score member ...]
Group
Sorted set
Since
1.0.0
Arity
at least 4
Flags
write

Complexity

O(M log N) — O(1) hash insert plus O(log N) tree insert per member

Complexity and compatibility are read out of kevy's implementation, not copied from Redis's reference. Several genuinely differ.

Redis compatibility

Compatible

Behaves as Redis does.

See also

BZPOPMINZCARDZCOUNTZDIFFSTOREZINCRBYZINTERCARDZINTERSTOREZPOPMINZPOPMIN.BELOWZRANGEZRANGEBYSCOREZRANKZREMZREMRANGEBYRANKZREMRANGEBYSCOREZREVRANGEBYSCOREZSCANZSCOREZUNIONSTORE

← All commands