redis基本数据类型 list类型

1) BLMOVE source destination LEFT|RIGHT LEFT|RIGHT timeout 列表弹出一个元素,推到另一个列表并返回,或者阻塞直到一个是可用的

LEFT|RIGHT LEFT|RIGHT : 弹出元素位置

summary: Pop an element from a list, push it to another list and return it; or block until one is available
since: 6.2.0

2)BLPOP key [key ...] timeout        移除并返回第一个元素,或者阻塞直到一个可用

summary: Remove and get the first element in a list, or block until one is available
since: 2.0.0

3)BRPOP key [key ...] timeout        移除并获取列表最后一个元素,或者阻塞直到一个元素可用

summary: Remove and get the last element in a list, or block until one is available
since: 2.0.0

4)BRPOPLPUSH source destination timeout        弹出一个元素将其推到另一个list中并返回该元素,或者阻塞直到一个可用

summary: Pop an element from a list, push it to another list and return it; or block until one is available
since: 2.2.0

5)LINDEX key index        通过索引获取列表中的元素

summary: Get an element from a list by its index
since: 1.0.0

5)LINSERT key BEFORE|AFTER pivot element 在列表中,另一个元素之前或者之后插入一个元素

summary: Insert an element before or after another element in a list
since: 2.2.0

6)LLEN key        获取list长度

summary: Get the length of a list
since: 1.0.0

7)LMOVE source destination LEFT|RIGHT LEFT|RIGHT        列表中弹出一个元素,推到另外一个列表中并返回它

summary: Pop an element from a list, push it to another list and return it
since: 6.2.0

8)LPOP key [count]        删除并返回list中的第一个元素

summary: Remove and get the first elements in a list
since: 1.0.0

9)LPOS key element [RANK rank] [COUNT num-matches] [MAXLEN len]        返回list中匹配元素的索引

summary: Return the index of matching elements on a list
since: 6.0.6

10)LPUSH key element [element ...]  在list前面加n个元素

summary: Prepend one or multiple elements to a list
since: 1.0.0

11)LPUSHX key element [element ...]        仅当列表存在时,在列表中加入n个元素

summary: Prepend an element to a list, only if the list exists
since: 2.2.0

12)LRANGE key start stop        获取列表中范围内的元素

summary: Get a range of elements from a list
since: 1.0.0

13)LREM key count element        从列表中删除元素

summary: Remove elements from a list
since: 1.0.0

14)LSET key index element        通过索引设置列表中元素的值

summary: Set the value of an element in a list by its index
since: 1.0.0

15)LTRIM key start stop        将列表修剪到指定范围(删除范围两边的值)

summary: Trim a list to the specified range
since: 1.0.0

16)RPOP key [count]

summary: Remove and get the last elements in a list
since: 1.0.0

17)RPOPLPUSH source destination        删除列表中最后一个元素,将它前置到另一个列表并且返回它

summary: Remove the last element in a list, prepend it to another list and return it
since: 1.2.0

18)RPUSH key element [element ...]        在列表中附加一个或多个元素

summary: Append one or multiple elements to a list
since: 1.0.0

19)RPUSHX key element [element ...]       仅当列表存在时,在列表中附加一个元素 

summary: Append an element to a list, only if the list exists
since: 2.2.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值