Skip to content
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 support for hashmaps #598

Open
WisdomPill opened this issue Apr 3, 2022 · 6 comments · Fixed by #719
Open

Add support for hashmaps #598

WisdomPill opened this issue Apr 3, 2022 · 6 comments · Fixed by #719
Assignees

Comments

@WisdomPill
Copy link
Member

Problem Statement
django-redis should introduce hasmaps and support basic operations, hset, hdel, hlen, hkeys and hexists.

Describe the solution you'd like
Add an interface similar to redis-py to support hasps

@YashKumarVerma
Copy link

@WisdomPill is this one resolved or are we still looking for help here? I'm interested if its needed

@WisdomPill
Copy link
Member Author

still looking for an implementation, #654 is a very good attempt at it on the sets side, if you want to propose a solution you're very welcome to do so 😄

@kysre kysre linked a pull request Jan 27, 2024 that will close this issue
@LucianaAG
Copy link

is available to work on this issue?

@WisdomPill
Copy link
Member Author

Hello @LucianaAG I think @kysre is doing all right here, you can try to do something similar to his PR for sets maybe?

@WisdomPill
Copy link
Member Author

support for hset, hlen, hdel, hkeys and hexists has been added thanks to the efforts of @kysre.

Things left to add to make it complete are.

  • tests for in ShardClient (this should be fairly easy, replacing get_client with method with make_key and get_server based on the key should do the trick like it is done in other ShardedClient methods)
  • HDEL
  • HEXISTS
  • HGET quite important
  • HGETALL quite important
  • HINCRBY
  • HINCRYBYFLOAT
  • HKEYS
  • HLEN
  • HMGET
  • HMSET
  • HRANDFIELD not relevant
  • HSCAN
  • HSET
  • HSETNX relevant could be implemented in .hset()
  • HSTRLEN not relevant
  • HVALS not relevant

any contribution is welcome, I consider this a beginner friendly issue

@LucianaAG LucianaAG self-assigned this Jan 31, 2024
rootart added a commit to rootart/django-redis that referenced this issue Jun 23, 2024
rootart added a commit to rootart/django-redis that referenced this issue Jun 23, 2024
@rootart
Copy link
Contributor

rootart commented Jun 23, 2024

Hi, @WisdomPill I extended support for the missing hashmap functions and would appreciate your feedback when you have some spare time.
HINCRYBYFLOAT is one of the functions that is missing and I think it would require a bit more work to implement given how we do the decoding/encoding of the values https://github.com/jazzband/django-redis/blob/master/django_redis/client/default.py#L509-L518 I worry if we explicitly store the float value it would come up as incompatible change. Let me know what are your thoughts on this and thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants