Skip to content

Commit

Permalink
Add zscan noscores. (#88)
Browse files Browse the repository at this point in the history
Doc PR for valkey-io/valkey#324

Signed-off-by: Chen Tianjie <TJ_Chen@outlook.com>
  • Loading branch information
CharlesChen888 committed May 7, 2024
1 parent 569152c commit cd328a5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions commands/scan.md
Expand Up @@ -197,6 +197,25 @@ OK
2) "b"
```

## The NOSCORES option

When using `ZSCAN`, you can use the `NOSCORES` option to make Valkey return only the members in the sorted set without their corresponding scores.

```
127.0.0.1:6379> ZADD myzset 1 a 2 b
(integer) 2
127.0.0.1:6379> ZSCAN myzset 0
1) "0"
2) 1) "a"
2) "1"
3) "b"
4) "2"
127.0.0.1:6379> ZSCAN myzset 0 NOSCORES
1) "0"
2) 1) "a"
2) "b"
```

## Multiple parallel iterations

It is possible for an infinite number of clients to iterate the same collection at the same time, as the full state of the iterator is in the cursor, that is obtained and returned to the client at every call. No server side state is taken at all.
Expand Down

0 comments on commit cd328a5

Please sign in to comment.