mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
14d6abd8e9
This is similar to the recent addition of LMPOP/BLMPOP (#9373), but zset. Syntax for the new ZMPOP command: `ZMPOP numkeys [<key> ...] MIN|MAX [COUNT count]` Syntax for the new BZMPOP command: `BZMPOP timeout numkeys [<key> ...] MIN|MAX [COUNT count]` Some background: - ZPOPMIN/ZPOPMAX take only one key, and can return multiple elements. - BZPOPMIN/BZPOPMAX take multiple keys, but return only one element from just one key. - ZMPOP/BZMPOP can take multiple keys, and can return multiple elements from just one key. Note that ZMPOP/BZMPOP can take multiple keys, it eventually operates on just on key. And it will propagate as ZPOPMIN or ZPOPMAX with the COUNT option. As new commands, if we can not pop any elements, the response like: - ZMPOP: Return a NIL in both RESP2 and RESP3, unlike ZPOPMIN/ZPOPMAX return emptyarray. - BZMPOP: Return a NIL in both RESP2 and RESP3 when timeout is reached, like BZPOPMIN/BZPOPMAX. For the normal response is nested arrays in RESP2 and RESP3: ``` ZMPOP/BZMPOP 1) keyname 2) 1) 1) member1 2) score1 2) 1) member2 2) score2 In RESP2: 1) "myzset" 2) 1) 1) "three" 2) "3" 2) 1) "two" 2) "2" In RESP3: 1) "myzset" 2) 1) 1) "three" 2) (double) 3 2) 1) "two" 2) (double) 2 ``` |
||
---|---|---|
.. | ||
aof-race.tcl | ||
aof.tcl | ||
block-repl.tcl | ||
convert-ziplist-hash-on-load.tcl | ||
convert-ziplist-zset-on-load.tcl | ||
convert-zipmap-hash-on-load.tcl | ||
corrupt-dump-fuzzer.tcl | ||
corrupt-dump.tcl | ||
dismiss-mem.tcl | ||
failover.tcl | ||
logging.tcl | ||
psync2-master-restart.tcl | ||
psync2-pingoff.tcl | ||
psync2-reg.tcl | ||
psync2.tcl | ||
rdb.tcl | ||
redis-benchmark.tcl | ||
redis-cli.tcl | ||
replication-2.tcl | ||
replication-3.tcl | ||
replication-4.tcl | ||
replication-psync.tcl | ||
replication.tcl |