Skip to content

Commit

Permalink
fix ZADD , ZADDINCR examples
Browse files Browse the repository at this point in the history
  • Loading branch information
shohamazon authored and barshaul committed Mar 13, 2024
1 parent 4273aa3 commit 48f77ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions node/src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1021,10 +1021,10 @@ export class BaseClient {
* If `changed` is set, returns the number of elements updated in the sorted set.
*
* @example
* await zadd("mySortedSet", \{ "member1": 10.5, "member2": 8.2 \})
* 2 (Indicates that two elements have been added or updated in the sorted set "mySortedSet".)
* await client.zadd("mySortedSet", \{ "member1": 10.5, "member2": 8.2 \})
* 2 (Indicates that two elements have been added to the sorted set "mySortedSet".)
*
* await zadd("existingSortedSet", \{ member1: 15.0, member2: 5.5 \}, \{ conditionalChange: "onlyIfExists" \});
* await client.zadd("existingSortedSet", \{ member1: 15.0, member2: 5.5 \}, \{ conditionalChange: "onlyIfExists" \} , true);
* 2 (Updates the scores of two existing members in the sorted set "existingSortedSet".)
*
*/
Expand Down Expand Up @@ -1057,10 +1057,10 @@ export class BaseClient {
* If there was a conflict with the options, the operation aborts and null is returned.
*
* @example
* await zaddIncr("mySortedSet", member , 5.0)
* await client.zaddIncr("mySortedSet", member , 5.0)
* 5.0
*
* await zaddIncr("existingSortedSet", member , "3.0" , \{ UpdateOptions: "ScoreLessThanCurrent" \})
* await client.zaddIncr("existingSortedSet", member , "3.0" , \{ UpdateOptions: "ScoreLessThanCurrent" \})
* null
*/
public zaddIncr(
Expand Down
8 changes: 4 additions & 4 deletions python/python/glide/async_commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1264,8 +1264,8 @@ async def zadd(
Examples:
>>> await client.zadd("my_sorted_set", {"member1": 10.5, "member2": 8.2})
2 # Indicates that two elements have been added or updated in the sorted set "my_sorted_set."
>>> await client.zadd("existing_sorted_set", {"member1": 15.0, "member2": 5.5}, existing_options=ConditionalChange.XX)
2 # Indicates that two elements have been added to the sorted set "my_sorted_set."
>>> await client.zadd("existing_sorted_set", {"member1": 15.0, "member2": 5.5}, existing_options=ConditionalChange.XX, changed=True)
2 # Updates the scores of two existing members in the sorted set "existing_sorted_set."
"""
args = [key]
Expand Down Expand Up @@ -1326,9 +1326,9 @@ async def zadd_incr(
If there was a conflict with choosing the XX/NX/LT/GT options, the operation aborts and None is returned.
Examples:
>>> await client.zaddIncr("my_sorted_set", member , 5.0)
>>> await client.zadd_incr("my_sorted_set", member , 5.0)
5.0
>>> await client.zaddIncr("existing_sorted_set", member , "3.0" , UpdateOptions.LESS_THAN)
>>> await client.zadd_incr("existing_sorted_set", member , "3.0" , UpdateOptions.LESS_THAN)
None
"""
args = [key]
Expand Down

0 comments on commit 48f77ae

Please sign in to comment.