Redis Sscan Command

Redis Set

Redis Sscan command is used to iterate over elements of a set key. Sscan inherits fromScan。

Syntax

The basic syntax of the redis Sscan command is as follows:

SSCAN key cursor [MATCH pattern] [COUNT count]
  • cursor - The cursor.
  • pattern - The matching pattern.
  • count - Specifies how many elements to return from the dataset, the default value is 10.

Available Versions

>= 2.8.0

Return Value

Array list.

Example

Example

> SADD myset1 "Google"
(integer) 1
> SADD myset1 "Example"
(integer) 1
> SADD myset1 "Taobao"
(integer) 1
> SSCAN myset1 0 match R*
1) "0"
2) 1) "Example"

Redis Set

Other Extensions