Hash Support
#71
-
Is there any support for hashes (https://redis.io/docs/data-types/hashes/)? If so, what would that look like in a Command? |
Beta Was this translation helpful? Give feedback.
Answered by
ra1u
Nov 29, 2022
Replies: 1 comment 4 replies
-
You can start with something like Command cmd = await RedisConnection().connect('localhost', 6379);
var i = await cmd.send_object(["HSET", "user:123", "username", "martina", "firstName", "Martina", "lastName", "Elisa", "country","GB"]);
print("hash size is now $i");
var user = await cmd.send_object(["HGET", "user:123", "username");
print("user $user");
var all = await cmd.send_object("HGETALL", "user:123");
print("user $all"); I don't have compiler here and for this reason you will likely need to do some tweaking. Let me know if you have difficulties making this example to run. Fell free to post your suggestions, ideas or questions on how we can move forward from here. Kind regards, Luka |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
garysm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can start with something like
I don't have compiler here and for this reason you will likely need to do some tweaking. Let me know if you have difficulties making this example to run. Fell free to post your suggestions, ideas or questions on how we can move forward from here.
Kind regards, Luka