ZADD
Add members with scores to a sorted set, with conditional flags.
ZADD key [NX|XX] [GT|LT] [CH] [INCR] score member [score member ...]
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