Set

SADD

Adds one or more members to a set.

Arguments

keybodystrrequired

The key of the set.

membersbody...TValue[]required

One or more members to add to the set.

Response

numberrequired

The number of elements that were added to the set, not including all the elements already present in the set.

Example
assert redis.sadd("key", "a", "b", "c") == 3
Loading search…