-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rahul Desirazu
committed
Mar 13, 2019
1 parent
b2e6d01
commit c6e9caf
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
title: ZSCORE | ||
linkTitle: ZSCORE | ||
description: ZSCORE | ||
menu: | ||
latest: | ||
parent: api-yedis | ||
weight: 2545 | ||
aliases: | ||
- /latest/api/redis/zscore | ||
- /latest/api/yedis/zscore | ||
isTocNested: true | ||
showAsideToc: true | ||
--- | ||
|
||
## Synopsis | ||
<b>`ZSCORE key member`</b><br> | ||
Returns the score of the member in the sorted set at key. If member does not exist in the sorted set, | ||
or key does not exist, null is returned. If `key` is associated with non sorted set data, | ||
an error is returned. | ||
|
||
## Return Value | ||
|
||
The score of member (a double precision floating point number), represented as string. | ||
|
||
## Examples | ||
|
||
```sh | ||
$ ZADD z_key 1.0 v1 | ||
``` | ||
|
||
``` | ||
(integer) 1 | ||
``` | ||
|
||
```sh | ||
$ ZSCORE z_key v1 | ||
``` | ||
|
||
``` | ||
"1.0" | ||
``` | ||
|
||
```sh | ||
$ ZSCORE z_key v2 | ||
``` | ||
|
||
``` | ||
(null) | ||
``` | ||
|
||
## See Also | ||
|
||
[`zadd`](../zadd/), [`zcard`](../zcard/), [`zrange`](../zrange/), [`zrangebyscore`](../zrangebyscore/), [`zrem`](../zrem/), [`zrevrange`](../zrevrange) |