-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add zhash value type #13
Comments
I'd like to take a stab at this, if that's ok. |
@carmo-evan Go ahead. That would be awesome! |
@vrongmeal Hi! Sorry, I just had a chance to look into it yesterday. From what I can gather, zhash will be very similar to zset, and we can probably use the same underlying sortedSet value. What would you like the API to be like? Do you want to be able to insert the value together with they key in the INSERT method, or do you want to do it in two steps - insert the key, and then update to set the value and the score? Thank you! |
When inserting, you can do both the things. Parameters are dynamic. So if you get one parameter you can just insert it, if you get two, you can insert while setting the value. There will always be a "SET" action if someone wants to insert the key and then set the value. |
PR is up here #17 |
Closed through #17 |
It would be great to have a "zhash" in standard set of values. This would be similar to zset (or scored set) with the difference that a zhash will have a value along with the score.
A zset can be thought of as:
whereas a zhash will be:
For documentation on how to add a new value type, see: https://kiwi.sdslabs.co/docs/add-new-value-type.html
The text was updated successfully, but these errors were encountered: