redis / redis-om-python

Object mapping, and more, for Redis and Python
MIT License
1.09k stars 108 forks source link

fix: all_pks() for complex keys #471

Closed YaraslauZhylko closed 1 year ago

YaraslauZhylko commented 1 year ago

Description

HashModel.all_pks() and JsonModel.all_pks() return only the last part of the Redis key after the last colon (:) instead of full key without the global/modal prefixes.

This only makes difference when we use colons in the primary keys. E.g.:

See related Issue fro details.

Related issues

codecov-commenter commented 1 year ago

Codecov Report

Base: 78.85% // Head: 78.92% // Increases project coverage by +0.07% :tada:

Coverage data is based on head (f5c6ada) compared to base (721f734). Patch coverage: 100.00% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #471 +/- ## ========================================== + Coverage 78.85% 78.92% +0.07% ========================================== Files 14 14 Lines 1173 1177 +4 ========================================== + Hits 925 929 +4 Misses 248 248 ``` | Flag | Coverage Δ | | |---|---|---| | unit | `78.92% <100.00%> (+0.07%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=redis#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/redis/redis-om-python/pull/471?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=redis) | Coverage Δ | | |---|---|---| | [aredis\_om/model/model.py](https://codecov.io/gh/redis/redis-om-python/pull/471?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=redis#diff-YXJlZGlzX29tL21vZGVsL21vZGVsLnB5) | `87.07% <100.00%> (+0.05%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=redis). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=redis)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

dvora-h commented 1 year ago

Fixes #470