Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Added 'exist' param to the 'zadd' method as ability setup NX or XX argument #288

Merged
merged 3 commits into from
Oct 26, 2017

Conversation

mastak
Copy link
Contributor

@mastak mastak commented Aug 27, 2017

Added exist parameter to the zadd method as ability setup NX or XX argument.

@codecov
Copy link

codecov bot commented Aug 27, 2017

Codecov Report

Merging #288 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #288      +/-   ##
==========================================
- Coverage   96.86%   96.83%   -0.03%     
==========================================
  Files          59       59              
  Lines        7553     7582      +29     
  Branches      599      602       +3     
==========================================
+ Hits         7316     7342      +26     
- Misses        173      175       +2     
- Partials       64       65       +1
Impacted Files Coverage Δ
tests/sorted_set_commands_test.py 100% <100%> (ø) ⬆️
aioredis/commands/sorted_set.py 100% <100%> (ø) ⬆️
aioredis/commands/server.py 83.89% <0%> (-1.35%) ⬇️
tests/sentinel_failover_test.py 85.71% <0%> (-0.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b2d4ec...00d160d. Read the comment docs.

@pcinkh
Copy link
Contributor

pcinkh commented Oct 1, 2017

@mastak pls, merge it, to make green: mastak#2

@pcinkh
Copy link
Contributor

pcinkh commented Oct 10, 2017

@mastak if you have time try to update from master

@mastak
Copy link
Contributor Author

mastak commented Oct 12, 2017

@pcinkh
have updated. thanks for the help with tests!

@@ -18,7 +18,10 @@ class SortedSetCommandsMixin:
ZSET_AGGREGATE_MIN = 'ZSET_AGGREGATE_MIN'
ZSET_AGGREGATE_MAX = 'ZSET_AGGREGATE_MAX'

def zadd(self, key, score, member, *pairs):
SET_IF_NOT_EXIST = 'SET_IF_NOT_EXIST' # NX
SET_IF_EXIST = 'SET_IF_EXIST' # XX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch, these two constants will conflict with the same ones in aioredis/commands/string.py.
Please rename both to ZSET_IF_NOT_EXIST / ZSET_IF_EXIST

@popravich popravich merged commit 24eca32 into aio-libs-abandoned:master Oct 26, 2017
@popravich
Copy link
Contributor

Thanks,

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

Successfully merging this pull request may close these issues.

None yet

3 participants