Closed Mullefa closed 9 years ago
You have the tests here : https://github.com/etaty/rediscala/blob/master/src/test/scala/redis/commands/HashesSpec.scala
redis.hmget("key", "field1", "field2", "nofield")
you also have hgetall
redis.hgetall("key")
you will receive all the fields for the key key
Sure, but what if I want to access the values for a group of fields that are stored in a list of arbitrary length?
You do
redis.hmget("key", list: _*)
http://stackoverflow.com/questions/1832061/scala-pass-seq-to-var-args-functions
Ok, thanks. On 4 Sep 2015 11:57, "Valerian" notifications@github.com wrote:
You do redis.hmget("key", list: _*)
http://stackoverflow.com/questions/1832061/scala-pass-seq-to-var-args-functions
— Reply to this email directly or view it on GitHub https://github.com/etaty/rediscala/issues/87#issuecomment-137704404.
Say I have a hash map in redis, and the fields I want values for are stored in a data structure in Scala such as a list. How would you suggest getting these values using your client. I figure
hmget()
would be better than iterating over the data structure withhget()
, but I can't work out how to do it.