SMEMBERS(3valkey)
π SMEMBERS π
okay bestie, welcome to the SMEMBERS page of the Valkey Command Manual (yes that's the manual name, we're keeping it, it's iconic) β¨
β¨ NAME β¨
smembers β returns all members of a set. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
SMEMBERS key
one key, one command, no notes. π
π¦ DESCRIPTION π¦
So basically: this returns all the members of the set value stored at key. every single one. the whole friend group, no one left behind. π«Ά
and here's a little tea β this has the same effect as running SINTER with one argument (key). same energy, different entrance. π
π REPLY π
RESP2
valkey-protocol(7) Array reply: all members of the set. π§Ί
RESP3
valkey-protocol(7) Set reply: all members of the set. π
β COMPLEXITY β
O(N) where N is the set cardinality. so likeβ¦ the more besties in the set, the more work. no cap. π₯
π ACL CATEGORIES π
@read@set@slow
π HISTORY π
- Available since:
1.0.0β she's been here since the beginning, a true OG π
π EXAMPLES π
127.0.0.1:6379> SADD myset "Hello"
(integer) 1
127.0.0.1:6379> SADD myset "World"
(integer) 1
127.0.0.1:6379> SMEMBERS myset
1) "Hello"
2) "World"
look at her go ππ two adds, two members, one flawless SMEMBERS. main character energy fr fr.
π SEE ALSO π
sadd(3valkey)scard(3valkey)sdiff(3valkey)sdiffstore(3valkey)sinter(3valkey)sintercard(3valkey)sinterstore(3valkey)sismember(3valkey)smismember(3valkey)smove(3valkey)spop(3valkey)srandmember(3valkey)srem(3valkey)sscan(3valkey)sunion(3valkey)sunionstore(3valkey)
the whole set-squad, together at last π«Άβ¨
okay that's the page!! π this was version 9.0.0, dated 2025-10-21, and that's your cute little sign-off bestie β go read SMEMBERS something, you ate π
ππ¦
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms