Say I add two keys:
SET husband Bob
SET wife Alice
Then add these to a set:
SADD family husband wife
I can get the keys of this set with SMEMBERS family
, which will return:
1) "wife"
2) "husband"
What I really want is the values:
1) "Alice"
2) "Bob"
Is this possible, in one operation? Essentially, I want to pipeline SMEMBERS
with MGET
.
SMEMBERS
, but if the Set is big enough your database will take time to return all the members, during which it will be blocked. In such cases the use of SSCAN
is recommended.
EDIT: missed the question itself :) use SORT family BY nosort GET *
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With