redict/tests/unit/type
Binbin 14d6abd8e9
Add ZMPOP/BZMPOP commands. (#9484)
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
```
2021-09-23 08:34:40 +03:00
..
hash.tcl Replace all usage of ziplist with listpack for t_hash (#8887) 2021-08-10 09:18:49 +03:00
incr.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
list-2.tcl Minor improvements for list-2 test (#8156) 2020-12-08 16:26:38 +02:00
list-3.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
list-common.tcl list test split into smaller parts 2011-07-11 11:30:46 +02:00
list.tcl Add ZMPOP/BZMPOP commands. (#9484) 2021-09-23 08:34:40 +03:00
set.tcl Adds limit to SINTERCARD/ZINTERCARD. (#9425) 2021-09-16 14:07:08 +03:00
stream-cgroups.tcl Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
stream.tcl Fix XINFO help for unexpected options. (#9075) 2021-06-15 10:01:11 +03:00
string.tcl Improve test suite to handle external servers better. (#9033) 2021-06-09 15:13:24 +03:00
zset.tcl Add ZMPOP/BZMPOP commands. (#9484) 2021-09-23 08:34:40 +03:00