diff --git a/cts.json b/cts.json index 1737c37..f191d94 100644 --- a/cts.json +++ b/cts.json @@ -1263,5 +1263,1677 @@ 0 ], "since": "4.0.0" + }, + + { + "name": "sadd command", + "command": [ + "sadd myset 0", + "sadd myset 1", + "sadd myset 0" + ], + "result": [ + 1, 1, + 0 + ], + "since": "1.0.0" + }, + + { + "name": "sadd command", + "command": [ + "sadd myset 0", + "sadd myset 1, 2, 3", + "sadd myset 0" + ], + "result": [ + 1, + 3, + 0 + ], + "since": "2.4.0" + }, + + { + "name": "scard command", + "command": [ + "sadd myset 0", + "sadd myset 1", + "scard myset" + ], + "result": [ + 1, 1, + 2 + ], + "since": "1.0.0" + }, + + { + "name": "sdiff command", + "command": [ + "sadd myset 0", + "sadd myset 1", + "sadd myset 2", + "sadd myset1 2", + "sadd myset1 3", + "sadd myset1 4", + "sdiff myset myset1" + ], + "result": [ + 1, 1, 1, + 1, 1, 1, + [ + "0", + "1" + ] + ], + "since": "1.0.0" + }, + + { + "name": "sdiffstore command", + "command": [ + "sadd myset1 0", + "sadd myset1 1", + "sadd myset1 2", + "sadd myset2 2", + "sadd myset2 3", + "sadd myset2 4", + "sdiffstore myset myset1 myset2" + ], + "result": [ + 1, 1, 1, + 1, 1, 1, + 2 + ], + "since": "1.0.0" + }, + + { + "name": "sinter command", + "command": [ + "sadd myset 0", + "sadd myset 1", + "sadd myset1 1", + "sadd myset1 2", + "sinter myset myset1" + ], + "result": [ + 1, 1, + 1, 1, + [ + "1" + ] + ], + "since": "1.0.0" + }, + + { + "name": "sintercard command", + "command": [ + "sadd myset 0", + "sadd myset 1", + "sadd myset1 1", + "sadd myset1 2", + "sintercard 2 myset myset1" + ], + "result": [ + 1, 1, + 1, 1, + 1 + ], + "since": "7.0.0" + }, + + { + "name": "sintercard with limit", + "command": [ + "sadd myset 0", + "sadd myset 1", + "sadd myset1 1", + "sadd myset1 2", + "sintercard 2 myset myset1 limit 1" + ], + "result": [ + 1, 1, + 1, 1, + 1 + ], + "since": "7.0.0" + }, + + { + "name": "sinterstore command", + "command": [ + "sadd myset1 0", + "sadd myset1 1", + "sadd myset2 1", + "sadd myset2 2", + "sinterstore myset myset1 myset2" + ], + "result": [ + 1, 1, + 1, 1, + 1 + ], + "since": "1.0.0" + }, + + { + "name": "sismember command", + "command": [ + "sadd myset 0", + "sismember myset 0", + "sismember myset 1" + ], + "result": [ + 1, + 1, + 0 + ], + "since": "1.0.0" + }, + + { + "name": "smembers command", + "command": [ + "sadd myset 0", + "sadd myset 1", + "smembers myset" + ], + "result": [ + 1, + 1, + [ + "0", + "1" + ] + ], + "since": "1.0.0" + }, + + { + "name": "smismember command", + "command": [ + "sadd myset 0", + "smismember myset 0 1" + ], + "result": [ + 1, + [ + 1, + 0 + ] + ], + "since": "6.2.0" + }, + + { + "name": "smove command", + "command": [ + "sadd myset 0", + "sadd myset 1", + "sadd myotherset 2", + "smove myset myotherset 1" + ], + "result": [ + 1, 1, + 1, + 1 + ], + "since": "1.0.0" + }, + + { + "name": "spop command", + "command": [ + "sadd myset 0", + "spop myset" + ], + "result": [ + 1, + "0" + ], + "since": "1.0.0" + }, + + { + "name": "spop with count", + "command": [ + "sadd myset 0", + "spop myset 1" + ], + "result": [ + 1, + [ + "0" + ] + ], + "since": "3.2.0" + }, + + { + "name": "srandmember command", + "command": [ + "sadd myset 0", + "srandmember myset" + ], + "result": [ + 1, + "0" + ], + "since": "1.0.0" + }, + + { + "name": "srandmember with count", + "command": [ + "sadd myset 0", + "srandmember myset 1" + ], + "result": [ + 1, + [ + "0" + ] + ], + "since": "2.6.0" + }, + + { + "name": "srem command", + "command": [ + "sadd myset 0", + "sadd myset 1", + "srem myset 0", + "srem myset 2" + ], + "result": [ + 1, 1, + 1, + 0 + ], + "since": "1.0.0" + }, + + { + "name": "srem with multiple member", + "command": [ + "sadd myset 0", + "sadd myset 1", + "srem myset 0 1", + "srem myset 2" + ], + "result": [ + 1, 1, + 2, + 0 + ], + "since": "2.4.0" + }, + + { + "name": "sscan command", + "command": [ + "sadd myset 0", + "sadd myset 1", + "sscan myset 0" + ], + "result": [ + 1, 1, + [ + "0", + [ + "0", "1" + ] + ] + ], + "since": "2.8.0" + }, + + { + "name": "sscan with match and count", + "command": [ + "sadd myset 0", + "sadd myset 1", + "sscan myset 0 match * count 10" + ], + "result": [ + 1, 1, + [ + "0", + [ + "0", "1" + ] + ] + ], + "since": "2.8.0" + }, + + { + "name": "sunion command", + "command": [ + "sadd myset 0", + "sadd myset1 1", + "sunion myset myset1" + ], + "result": [ + 1, 1, + [ + "0", + "1" + ] + ], + "since": "1.0.0" + }, + + { + "name": "sunionstore command", + "command": [ + "sadd myset1 0", + "sadd myset2 1", + "sunionstore myset myset1 myset2" + ], + "result": [ + 1, 1, + 2 + ], + "since": "1.0.0" + }, + + { + "name": "bzmpop command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset1 3 three", + "bzmpop 0 1 myzset MIN" + ], + "result": [ + 1, 1, 1, + [ + "myzset", + [ + [ + "one", "1" + ] + ] + ] + ], + "since": "7.0.0" + }, + + { + "name": "bzmpop with COUNT", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset1 3 three", + "bzmpop 3.14 1 myzset MIN count 2" + ], + "result": [ + 1, 1, 1, + [ + "myzset", + [ + [ + "one", "1" + ], + [ + "two", "2" + ] + ] + ] + ], + "since": "7.0.0" + }, + + { + "name": "bzpopmax command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "bzpopmax myzset 0" + ], + "result": [ + 1, 1, 1, + [ + "myzset", + "three", "3" + ] + ], + "since": "5.0.0" + }, + + { + "name": "bzpopmax with double timeout", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "bzpopmax myzset 3.14" + ], + "result": [ + 1, 1, 1, + [ + "myzset", + "three", "3" + ] + ], + "since": "6.0.0" + }, + + { + "name": "bzpopmin command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "bzpopmin myzset 0" + ], + "result": [ + 1, 1, 1, + [ + "myzset", + "one", "1" + ] + ], + "since": "5.0.0" + }, + + { + "name": "bzpopmin with double timeout", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "bzpopmin myzset 1 3.14" + ], + "result": [ + 1, 1, 1, + [ + "myzset", + "one", "1" + ] + ], + "since": "6.0.0" + }, + + { + "name": "zadd command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 1 uno", + "zrange myzset 0 -1" + ], + "result": [ + 1, + 1, + [ + "one", + "uno" + ] + ], + "since": "1.2.0" + }, + + { + "name": "zadd with multiple elements", + "command": [ + "zadd myzset 1 one 1 uno", + "zrange myzset 0 -1" + ], + "result": [ + 2, + [ + "one", + "uno" + ] + ], + "since": "2.4.0" + }, + + + { + "name": "zadd with XX / NX / CH / INCR", + "command": [ + "zadd myzset 1 one 1 uno", + "zadd myzset xx 2 one 2 two", + "zadd myzset nx 3 uno 3 three", + "zadd myzset ch 1 one 1 uno 3 three", + "zadd myzset 3 five", + "zadd incr 2 five" + ], + "result": [ + 2, + 0, + 1, + 1, + 1, + 1 + ], + "since": "3.0.2" + }, + + { + "name": "zadd with GT / LT", + "command": [ + "zadd myzset 1 one", + "zadd myzset gt 10 one", + "zadd myzset 10 uno", + "zadd myzset lt 1 uno", + "zrange myzset 0 -1 withscores" + ], + "result": [ + 1, + 0, + 1, + 0, + [ + "uno", "1", + "one", "10" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zcard command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 uno", + "zcard myzset" + ], + "result": [ + 1, 1, + 2 + ], + "since": "1.2.0" + }, + + { + "name": "zcount command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 uno", + "zcount myzset -inf +inf" + ], + "result": [ + 1, 1, + 2 + ], + "since": "2.0.0" + }, + + { + "name": "zdiff command", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset1 3 three", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zdiff 2 myzset1 myzset2" + ], + "result": [ + 1, 1, + 1, 1, 1, + [ + "three" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zdiffstore command", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset1 3 three", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zdiffstore myzset 2 myzset1 myzset2", + "zrange myzset 0 -1" + ], + "result": [ + 1, 1, + 1, 1, 1, + 1, + [ + "three" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zincrby command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zincrby myzset 2 one", + "zrange myzset 0 -1 withscores" + ], + "result": [ + 1, 1, + "3", + [ + "two", "2", + "one", "3" + ] + ], + "since": "1.2.0" + }, + + { + "name": "zinter command", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zadd myzset2 3 three", + "zinter 2 myzset1 myzset2" + ], + "result": [ + 1, 1, + 1, 1, 1, + [ + "one", "two" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zinter with WEIGHTS", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zadd myzset2 3 three", + "zinter 2 myzset1 myzset2 weights 2 2" + ], + "result": [ + 1, 1, + 1, 1, 1, + [ + "one", "two" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zinter with AGGREGATE", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zadd myzset2 3 three", + "zinter 2 myzset1 myzset2 aggregate sum" + ], + "result": [ + 1, 1, + 1, 1, 1, + [ + "one", "two" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zinter WITHSCORES", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zadd myzset2 3 three", + "zinter 2 myzset1 myzset2 withscores" + ], + "result": [ + 1, 1, + 1, 1, 1, + [ + "one", "2", + "two", "4" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zintercard command", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zadd myzset2 3 three", + "zintercard 2 myzset1 myzset2" + ], + "result": [ + 1, 1, + 1, 1, 1, + 2 + ], + "since": "7.0.0" + }, + + { + "name": "zintercard with LIMIT", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zadd myzset2 3 three", + "zintercard 2 myzset1 myzset2 limit 1" + ], + "result": [ + 1, 1, + 1, 1, 1, + 1 + ], + "since": "7.0.0" + }, + + { + "name": "zinterstore command", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zadd myzset2 3 three", + "zinterstore myzset 2 myzset1 myzset2" + ], + "result": [ + 1, 1, + 1, 1, 1, + 2 + ], + "since": "2.0.0" + }, + + { + "name": "zinterstore with WEIGHTS", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zadd myzset2 3 three", + "zinterstore myzset 2 myzset1 myzset2 weights 2 2" + ], + "result": [ + 1, 1, + 1, 1, 1, + 2 + ], + "since": "2.0.0" + }, + + { + "name": "zinterstore with AGGREGATE", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset2 1 one", + "zadd myzset2 2 two", + "zadd myzset2 3 three", + "zinterstore myzset 2 myzset1 myzset2 aggregate sum" + ], + "result": [ + 1, 1, + 1, 1, 1, + 2 + ], + "since": "2.0.0" + }, + + { + "name": "zlexcount command", + "command": [ + "zadd myzset 0 a 0 b 0 c", + "zlexcount myzset - +" + ], + "result": [ + 3, + 3 + ], + "since": "2.8.9" + }, + + { + "name": "zmpop command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset1 3 three", + "zmpop 1 myzset MIN" + ], + "result": [ + 1, 1, 1, + [ + "myzset", + [ + [ + "one", "1" + ] + ] + ] + ], + "since": "7.0.0" + }, + + { + "name": "zmpop with COUNT", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset1 3 three", + "zmpop 1 myzset MIN count 2" + ], + "result": [ + 1, 1, 1, + [ + "myzset", + [ + [ + "one", "1" + ], + [ + "two", "2" + ] + ] + ] + ], + "since": "7.0.0" + }, + + { + "name": "zmscore command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zmscore myzset one two three" + ], + "result": [ + 1, 1, + [ + "1", "2", null + ] + ], + "since": "6.2.0" + }, + + { + "name": "zpopmax command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zpopmax myzset" + ], + "result": [ + 1, 1, 1, + [ + "three", "3" + ] + ], + "since": "5.0.0" + }, + + { + "name": "zpopmax with COUNT", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zpopmax myzset 2" + ], + "result": [ + 1, 1, 1, + [ + "three", "3", + "two", "2" + ] + ], + "since": "5.0.0" + }, + + { + "name": "zpopmin command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zpopmin myzset" + ], + "result": [ + 1, 1, 1, + [ + "one", "1" + ] + ], + "since": "5.0.0" + }, + + { + "name": "zpopmin command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zpopmin myzset 2" + ], + "result": [ + 1, 1, 1, + [ + "one", "1", + "two", "2" + ] + ], + "since": "5.0.0" + }, + + { + "name": "zrandmember command", + "command": [ + "zadd myzset 0 a", + "zrandmember myzset" + ], + "result": [ + 1, + "a" + ], + "since": "6.2.0" + }, + + { + "name": "zrandmember with COUNT", + "command": [ + "zadd myzset 0 a", + "zrandmember myzset -2" + ], + "result": [ + 1, + [ + "a", + "a" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zrandmember with WITHSCORES", + "command": [ + "zadd myzset 0 a", + "zrandmember myzset -1 withscores" + ], + "result": [ + 1, + [ + "a", "0" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zrange command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zrange myzset 0 -1" + ], + "result": [ + 1, 1, 1, + [ + "one", + "two", + "three" + ] + ], + "since": "1.2.0" + }, + + { + "name": "zrange with WITHSCORES", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zrange myzset 0 -1 withscores" + ], + "result": [ + 1, 1, 1, + [ + "one", "1", + "two", "2", + "three", "3" + ] + ], + "since": "1.2.0" + }, + + { + "name": "zrange with BYSCORE / BYLEX", + "command": [ + "zadd myzset 1 a", + "zadd myzset 2 b", + "zadd myzset 3 c", + "zrange myzset 0 1 byscore", + "zrange myzset [a [b bylex" + ], + "result": [ + 1, 1, 1, + [ + "a" + ], + [ + "a", "b" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zrange with REV", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zrange myzset 0 1 rev" + ], + "result": [ + 1, 1, 1, + [ + "three", "two" + ] + ], + "since": "6.2.0" + }, + { + "name": "zrange with LIMIT", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zrange myzset 0 1 byscore limit 0 1" + ], + "result": [ + 1, 1, 1, + [ + "one" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zrangebylex command", + "command": [ + "zadd myzset 0 a 0 b 0 c 0 d 0 e", + "zrangebylex myzset - [c" + ], + "result": [ + 5, + [ + "a", "b", "c" + ] + ], + "since": "2.8.9" + }, + + { + "name": "zrangebylex with LIMIT", + "command": [ + "zadd myzset 0 a 0 b 0 c 0 d 0 e", + "zrangebylex myzset - [c limit 0 3" + ], + "result": [ + 5, + [ + "a", "b", "c" + ] + ], + "since": "2.8.9" + }, + + { + "name": "zrangebyscore command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zrangebyscore myzset -inf +inf" + ], + "result": [ + 1, 1, 1, + [ + "one", "two", "three" + ] + ], + "since": "1.0.5" + }, + + { + "name": "zrangebyscore with LIMIT", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zrangebyscore myzset -inf +inf limit 0 2" + ], + "result": [ + 1, 1, 1, + [ + "one", "two" + ] + ], + "since": "1.0.5" + }, + + { + "name": "zrangebyscore with WITHSCORES", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zrangebyscore myzset -inf +inf withscores" + ], + "result": [ + 1, 1, 1, + [ + "one", "1", + "two", "2", + "three", "3" + ] + ], + "since": "2.0.0" + }, + + { + "name": "zrangestore command", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset1 3 three", + "zrangestore myzset myzset1 0 1" + ], + "result": [ + 1, 1, 1, + 2 + ], + "since": "6.2.0" + }, + + { + "name": "zrangestore with BYSCORE / BYLEX", + "command": [ + "zadd myzset1 1 a", + "zadd myzset1 2 b", + "zadd myzset1 3 c", + "zrangestore myzset myzset1 0 1 byscore", + "zrangestore myzset myzset1 [a [b bylex" + ], + "result": [ + 1, 1, 1, + 1, + 2 + ], + "since": "6.2.0" + }, + + { + "name": "zrangestore with REV", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset1 3 three", + "zrangestore myzset myzset1 0 1 rev" + ], + "result": [ + 1, 1, 1, + 2 + ], + "since": "6.2.0" + }, + + { + "name": "zrangestore with LIMIT", + "command": [ + "zadd myzset1 1 one", + "zadd myzset1 2 two", + "zadd myzset1 3 three", + "zrangestore myzset myzset1 1 3 byscore limit 1 2" + ], + "result": [ + 1, 1, 1, + 2 + ], + "since": "6.2.0" + }, + + { + "name": "zrank command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zrank myzset two" + ], + "result": [ + 1, 1, + 1 + ], + "since": "2.0.0" + }, + + { + "name": "zrank with WITHSCORE", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zrank myzset two withscore" + ], + "result": [ + 1, 1, + [ + 1, "2" + ] + ], + "since": "7.2.0" + }, + + { + "name": "zrem command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zrem myzset two" + ], + "result": [ + 1, 1, + 1 + ], + "since": "1.2.0" + }, + + { + "name": "zrem with multiple elements", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zrem myzset two one" + ], + "result": [ + 1, 1, + 2 + ], + "since": "2.4.0" + }, + + { + "name": "zremrangebylex command", + "command": [ + "zadd myzset 0 a 0 b 0 c 0 d 0 e", + "zremrangebylex myzset [a [b" + ], + "result": [ + 5, + 2 + ], + "since": "2.8.9" + }, + + { + "name": "zremrangebyrank command", + "command": [ + "zadd myzset 0 a 0 b 0 c 0 d 0 e", + "zremrangebyrank myzset 0 1" + ], + "result": [ + 5, + 2 + ], + "since": "2.0.0" + }, + + { + "name": "zremrangebyscore command", + "command": [ + "zadd myzset 0 a 1 b 2 c 3 d 4 e", + "zremrangebylex myzset [a [b" + ], + "result": [ + 5, + 2 + ], + "since": "1.2.0" + }, + + { + "name": "zrevrange command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zrevrange myzset 0 -1" + ], + "result": [ + 1, 1, 1, + [ + "three", + "two", + "one" + ] + ], + "since": "1.2.0" + }, + + { + "name": "zrevrange with WITHSCORES", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset 3 three", + "zrevrange myzset 0 -1 withscores" + ], + "result": [ + 1, 1, 1, + [ + "three", "3", + "two", "2", + "one", "1" + ] + ], + "since": "1.2.0" + }, + + { + "name": "zrevrangebylex command", + "command": [ + "zadd myzset 0 a 0 b 0 c 0 d 0 e 0 f 0 g", + "zrevrangebylex myzset [c -" + ], + "result": [ + 7, + [ + "c", + "b", + "a" + ] + ], + "since": "2.8.9" + }, + + { + "name": "zrevrangebylex with LIMIT", + "command": [ + "zadd myzset 0 a 0 b 0 c 0 d 0 e 0 f 0 g", + "zrevrangebylex myzset [c - limit 2 2" + ], + "result": [ + 7, + [ + "a" + ] + ], + "since": "2.8.9" + }, + + { + "name": "zrevrangebyscore command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zrevrangebyscore myzset +inf -inf" + ], + "result": [ + 1, 1, + [ + "two", + "one" + ] + ], + "since": "2.2.0" + }, + + { + "name": "zrevrangebyscore with WITHSCORES", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zrevrangebyscore myzset +inf -inf withscores" + ], + "result": [ + 1, 1, + [ + "two", "2", + "one", "1" + ] + ], + "since": "2.2.0" + }, + + { + "name": "zrevrangebyscore with LIMIT", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zrevrangebyscore myzset +inf -inf limit 1 1" + ], + "result": [ + 1, 1, + [ + "one" + ] + ], + "since": "2.2.0" + }, + + { + "name": "zrevrangebyscore command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zrevrangebyscore myzset +inf -inf" + ], + "result": [ + 1, 1, + [ + "two", + "one" + ] + ], + "since": "2.2.0" + }, + + { + "name": "zrevrank command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zrevrank myzset one" + ], + "result": [ + 1, 1, + 1 + ], + "since": "2.0.0" + }, + + { + "name": "zrevrank with WITHSCORE", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zrevrank myzset one withscore" + ], + "result": [ + 1, 1, + [ + 1, "1" + ] + ], + "since": "7.2.0" + }, + + { + "name": "zscan command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zscan myzset 0" + ], + "result": [ + 1, 1, + [ + "0", + [ + "one", "1", + "two", "2" + ] + ] + ], + "since": "2.8.0" + }, + + { + "name": "zscan with MATCH and COUNT", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zscan myzset 0 match * count 10" + ], + "result": [ + 1, 1, + [ + "0", + [ + "one", "1", + "two", "2" + ] + ] + ], + "since": "2.8.0" + }, + + { + "name": "zscore command", + "command": [ + "zadd myzset 1 one", + "zscore myzset one" + ], + "result": [ + 1, + "1" + ], + "since": "1.2.0" + }, + + { + "name": "zunion command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset1 2 two", + "zadd myzset1 3 three", + "zunion 2 myzset myzset1" + ], + "result": [ + 1, 1, 1, 1, + [ + "one", + "three", + "two" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zunion with WEIGHTS and AGGREGATE", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset1 2 two", + "zadd myzset1 3 three", + "zunion 2 myzset myzset1 weights 2 2 aggregate max" + ], + "result": [ + 1, 1, 1, 1, + [ + "one", + "two", + "three" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zunion with WITHSCORES", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset1 2 two", + "zadd myzset1 3 three", + "zunion 2 myzset myzset1 withscores" + ], + "result": [ + 1, 1, 1, 1, + [ + "one", + "1", + "three", + "3", + "two", + "4" + ] + ], + "since": "6.2.0" + }, + + { + "name": "zunionstore command", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset1 2 two", + "zadd myzset1 3 three", + "zunionstore out 2 myzset myzset1" + ], + "result": [ + 1, 1, 1, 1, + 3 + ], + "since": "2.0.0" + }, + + { + "name": "zunionstore with WEIGHTS and AGGREGATE", + "command": [ + "zadd myzset 1 one", + "zadd myzset 2 two", + "zadd myzset1 2 two", + "zadd myzset1 3 three", + "zunionstore out 2 myzset myzset1 weights 1 1 aggregate max" + ], + "result": [ + 1, 1, 1, 1, + 3 + ], + "since": "2.0.0" } ]