Redis Sscan Command
The Redis Sscan command is used to iterate over the elements in a set; Sscan inherits from Scan.
Syntax
The basic syntax of the redis Sscan command is as follows:
SSCAN key cursor [MATCH pattern] [COUNT count]
- cursor - The cursor.
- pattern - The pattern to match.
- count - Specifies how many elements to return from the data set; the default value is 10.
Available Version
= 2.8.0
Return Value
An array list.
Example
Example
SADD myset1
"Google"
(
integer
)
1
SADD myset1
"Runoob"
(
integer
)
1
SADD myset1
"Taobao"
(
integer
)
1
SSCAN myset1
0
match R
1
)
"0"
2
)
1
)
"Runoob"
Redis Set