Skip to content

Commit

Permalink
Merge pull request #38 from YugaByte/ZScoreDocs
Browse files Browse the repository at this point in the history
[#34] ZSCORE Documentation
  • Loading branch information
rkarthik007 authored Mar 13, 2019
2 parents efe7035 + c6e9caf commit a2b59ee
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/content/latest/yedis/api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Command | Description |
[`ZRANGEBYSCORE`](zrangebyscore/) | Retrieve sorted set entries for a given score range |
[`ZREM`](zrem/) | Delete a sorted set entry |
[`ZREVRANGE`](zrevrange/) | Retrieve sorted set entries for given index range ordered from highest to lowest score |
[`ZSCORE`](zscore/) | Get the score of member at a sorted set key |
<b> General </b>|
[`AUTH`](auth/) | Authenticates a client connection to YEDIS API |
[`CONFIG`](config/) | Not fully supported. Only used to set the required password(s) for YEDIS API |
Expand Down
54 changes: 54 additions & 0 deletions docs/content/latest/yedis/api/zscore.md
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)

0 comments on commit a2b59ee

Please sign in to comment.