Redis 集合(Set)命令

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

Redis 的 Set 是 String 类型的无序集合。集合成员是唯一的,这就意味着集合中不能出现重复的数据。

Redis 中集合是通过哈希表实现的,所以添加,删除,查找的复杂度都是 O(1)。

下表列出了 Redis 集合基本命令:

序号 命令 描述
1 Redis Sadd 命令 向集合添加一个或多个成员
2 Redis Scard 命令 获取集合的成员数
3 Redis Sdiff 命令 返回给定所有集合的差集
4 Redis Sdiffstore 命令 返回给定所有集合的差集并存储在 destination 中
5 Redis Sinter 命令 返回给定所有集合的交集
6 Redis Sinterstore 命令 返回给定所有集合的交集并存储在 destination 中
7 Redis Sismember 命令 判断 member 元素是否是集合 key 的成员
8 Redis Smembers 命令 返回集合中的所有成员
9 Redis Smove 命令 将 member 元素从 source 集合移动到 destination 集合
10 Redis Spop 命令 移除并返回集合中的一个随机元素
11 Redis Srandmember 命令 返回集合中一个或多个随机数
12 Redis Srem 命令 移除集合中一个或多个成员
13 Redis Sunion 命令 返回所有给定集合的并集
14 Redis Sunionstore 命令 所有给定集合的并集存储在 destination 集合中
15 Redis Sscan 命令 迭代集合中的元素

更多命令请参考:Redis 命令

Algorithms for Image Processing and Computer Vision

Algorithms for Image Processing and Computer Vision

Parker, J. R. / 2010-12 / 687.00元

A cookbook of algorithms for common image processing applications Thanks to advances in computer hardware and software, algorithms have been developed that support sophisticated image processing with......一起来看看 《Algorithms for Image Processing and Computer Vision》 这本书的介绍吧!

HTML 编码/解码

HTML 编码/解码

HTML 编码/解码

XML、JSON 在线转换

XML、JSON 在线转换

在线XML、JSON转换工具