Add the specified members to the set stored at key.
Add the specified members to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members.
elements to be added
the set for chaining calls
Time complexity: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.
,An error is returned when the value stored at key is not a set.
Tests if the element is contained in the set.
Tests if the element is contained in the set. Returns true if exists, otherwise returns false
tested element
true if exists in the set, otherwise false
Time complexity: O(1)
Removes the specified members from the sorted set stored at key.
Removes the specified members from the sorted set stored at key. Non existing members are ignored. An error is returned when key exists and does not hold a sorted set.
elements to be removed
the set for chaining calls
Time complexity: O(N) where N is the number of members to be removed.
Returns the length of the collection stored at key.
Returns the length of the collection stored at key. If key does not exist, it is interpreted as an empty collection and 0 is returned. An error is returned when the value stored at key is not a proper collection.
Time complexity: O(1)
size of the list
Returns all elements in the set
Returns all elements in the set
all elements in the set
Time complexity: O(N) where N is the set cardinality.
Redis Sets are simply unsorted sets of objects. It is possible to add elements to a Redis Set by adding new elements into the collection.
This simplified wrapper implements only unordered Sets.
Data type of the inserted element