SMEMBERS(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

πŸ’– 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 πŸ‘‘

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