This repository has been archived by the owner on Jul 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
HGETALL returns array instead of hash #13
Comments
This was referenced Jun 19, 2015
The redis-rb gem has special instructions to convert the response in |
Thanks for your answer @yaauie ! If I may ask, what do you think would be more time efficient:
I also created a stackoverflow question about this HGETALL issue, if you don't mind, it would be nice to have your answer there. Really thanks for the help |
None of those; use response = ["an", "array", "with", "an", "even", "number", "of", "entries"]
#=> ["an", "array", "with", "an", "even", "number", "of", "entries"]
a_hash = Hash[*response]
#=> {"an"=>"array","with"=>"an", "even"=>"number", "of"=>"entries"] |
Thank @yaauie ! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Acessing the key from redis-rb gem using hgetall return a hash:
when accessing the same key with a lua script using wolverine it returns a array as shown:
hmget.lua:
Already tested, it was not messagePack fault =/
The text was updated successfully, but these errors were encountered: