Redis Rpoplpush 命令

更新时间: 2019-07-07 15:54

Redis Rpoplpush 命令用于移除列表的最后一个元素,并将该元素添加到另一个列表并返回。

语法

redis 127.0.0.1:6379> RPOPLPUSH SOURCE_KEY_NAME DESTINATION_KEY_NAME

返回值

被弹出的元素。

实例

redis 127.0.0.1:6379> RPUSH mylist "hello"
(integer) 1
redis 127.0.0.1:6379> RPUSH mylist "foo"
(integer) 2
redis 127.0.0.1:6379> RPUSH mylist "bar"
(integer) 3
redis 127.0.0.1:6379> RPOPLPUSH mylist myotherlist
"bar"
redis 127.0.0.1:6379> LRANGE mylist 0 -1
1) "hello"
2) "foo"

查看更多 Redis 列表(List)命令

Masterminds of Programming

Masterminds of Programming

Federico Biancuzzi、Chromatic / O'Reilly Media / 2009-03-27 / USD 39.99

Description Masterminds of Programming features exclusive interviews with the creators of several historic and highly influential programming languages. Think along with Adin D. Falkoff (APL), Jame......一起来看看 《Masterminds of Programming》 这本书的介绍吧!

JSON 在线解析

JSON 在线解析

在线 JSON 格式化工具

正则表达式在线测试

正则表达式在线测试

正则表达式在线测试

RGB HSV 转换

RGB HSV 转换

RGB HSV 互转工具