diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-17 07:34:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-07-17 07:34:44 +0000 |
commit | 02a04a2335701bfc8d6a1087338f58e9f37ceb52 (patch) | |
tree | 92c2c729cfdaaa3942a251357ff100e28a8b8624 /iredis/data/commands/rpop.md | |
parent | Adding upstream version 1.9.1. (diff) | |
download | iredis-02a04a2335701bfc8d6a1087338f58e9f37ceb52.tar.xz iredis-02a04a2335701bfc8d6a1087338f58e9f37ceb52.zip |
Adding upstream version 1.9.4.upstream/1.9.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/rpop.md')
-rw-r--r-- | iredis/data/commands/rpop.md | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/iredis/data/commands/rpop.md b/iredis/data/commands/rpop.md index 9c03902..6233c03 100644 --- a/iredis/data/commands/rpop.md +++ b/iredis/data/commands/rpop.md @@ -1,16 +1,29 @@ -Removes and returns the last element of the list stored at `key`. +Removes and returns the last elements of the list stored at `key`. + +By default, the command pops a single element from the end of the list. When +provided with the optional `count` argument, the reply will consist of up to +`count` elements, depending on the list's length. @return +When called without the `count` argument: + @bulk-string-reply: the value of the last element, or `nil` when `key` does not exist. +When called with the `count` argument: + +@array-reply: list of popped elements, or `nil` when `key` does not exist. + +@history + +- `>= 6.2`: Added the `count` argument. + @examples ```cli -RPUSH mylist "one" -RPUSH mylist "two" -RPUSH mylist "three" +RPUSH mylist "one" "two" "three" "four" "five" RPOP mylist +RPOP mylist 2 LRANGE mylist 0 -1 ``` |