Set type operation
Set Operation:
Sadd:sadd key value adds an element to the specified key and returns 0 repeatedly to indicate that the add failed
Srem:srem key value deletes the specified value within key
Spop:spop key randomly deletes a value within the key
Smove:smove Key1 Key2 Value adds the value in the Key1 to the Key2
Collection operation:
sdiff: Sdiff key1 key2 returns elements of Key1 in the difference set of Key1 and Key2
sdiffstore: sdiffstore key1 key2 key3 The differential set to be returned exists within the Key3
sinter: sinter key1 key2 return intersection of Key1 and Key2
sinterstore: sinterstore key1 key2 key3 The intersection exists within the Key3
sunion: sunion key1 key2 Key1 and Key2
sunionstore: sunionstore key1 key2 key3 will exist in Key3
Query operation:
Smembers:smembers key Query Key all values
Scard:scard Key returns the number of values in key
Sismember:sismember key value queries for the existence of value within key
Srandmember:srandmember randomly returns a value of key
Redis-set type operation