Redis 返回一个集合的全部成员的并集 命令:SUNION

SUNION key [key ...]

返回一个集合的全部成员,该集合是所有给定集合的并集。

不存在的 key 被视为空集。

 

可用版本:

>= 1.0.0

 

时间复杂度:

O(N), N 是所有给定集合的成员数量之和。

 

返回值:

并集成员的列表。

 

实例:

redis> SMEMBERS songs

1) "Billie Jean"

 

redis> SMEMBERS my_songs

1) "Believe Me"

 

redis> SUNION songs my_songs

1) "Billie Jean"

2) "Believe Me"

付杰
  • ¥ 398.0元
  • 市场价:498.0元
  • ¥ 69.0元
  • 市场价:99.0元
  • ¥ 99.0元
  • 市场价:199.0元
  • ¥ 598.0元
  • 市场价:2980.0元

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: