Skip to content

Commit

Permalink
t push origin masterMerge branch 'rename'
Browse files Browse the repository at this point in the history
  • Loading branch information
amitanandaiyer committed Mar 7, 2019
2 parents 5c82f62 + 5e503b7 commit 1e12f2c
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/content/latest/yedis/api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ Command | Description |
[`EXISTS`](exists/) | Check if the keys are present |
[`EXPIRE`](expire/) | Set key timeout in seconds |
[`EXPIREAT`](expireat/) | Set key timeout as timestamp |
[`SET`](set/) | Write or overwrite a string value |
[`SETEX`](setex/) | Write or overwrite a string value and set TTL in seconds |
[`PSETEX`](psetex/) | Write or overwrite a string value and set TTL in milliseconds |
[`SETRANGE`](setrange/) | Write a subsection of a string |
[`GET`](get/) | Read string value |
[`GETRANGE`](getrange/) | Read substring |
[`GETSET`](getset/) | Atomically read and write a string |
Expand All @@ -67,8 +71,6 @@ Command | Description |
<b> Set Data Type </b>|
[`SADD`](sadd/) | Add entries to a set |
[`SCARD`](scard/) | Read the number of entries in a set |
[`SET`](set/) | Write or overwrite a string value |
[`SETRANGE`](setrange/) | Write a subsection of a string |
[`SISMEMBER`](sismember/) | Check if the members are present in a set |
[`SMEMBERS`](smembers/) | Read all members of a set |
[`SREM`](srem/) | Remove members from a set |
Expand All @@ -94,6 +96,7 @@ Command | Description |
[`ECHO`](echo/) | Output messages |
[`MONITOR`](monitor/) | Debugging tool to see all requests that are processed by a YEDIS API server |
[`ROLE`](role/) | Read role of a node |
[`RENAME`](rename/) | Rename one key as another |
<b> Database </b>|
[`FLUSHALL`](flushall/) | Delete all keys from all databases |
[`FLUSHDB`](flushdb/) | Delete all keys from a database |
Expand Down
49 changes: 49 additions & 0 deletions docs/content/latest/yedis/api/psetex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: PSETEX
linkTitle: PSETEX
description: PSETEX
menu:
latest:
parent: api-redis
weight: 2272
aliases:
- /latest/api/redis/psetex
- /latest/api/yedis/psetex
isTocNested: true
showAsideToc: true
---

## Synopsis
<b>`PSETEX key ttl_in_msec string_value`</b><br>
This command sets the value of `key` to be `string_value`, and sets the key to expire in `ttl_in_msec` milli-seconds.

## Return Value
Returns status string.

## Examples

```sh
$ PSETEX yugakey 1000 "YugaByte"
```

```
"OK"
```

```sh
$ GET yugakey
```

```
"YugaByte"
```
```sh
$ PTTL yugakey
```

```
(integer) 900
```

## See Also
[`append`](../append/), [`set`](../set/), [`setex`](../setex/), [`get`](../get/), [`getrange`](../getrange/), [`getset`](../getset/), [`incr`](../incr/), [`incrby`](../incrby/), [`setrange`](../setrange/), [`strlen`](../strlen/)
30 changes: 30 additions & 0 deletions docs/content/latest/yedis/api/rename.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: RENAME
linkTitle: RENAME
description: RENAME
menu:
latest:
parent: api-redis
weight: 2265
aliases:
- /latest/api/redis/rename
- /latest/api/yedis/rename
isTocNested: true
showAsideToc: true
---

## Synopsis
<b>`RENAME key1 key2`</b><br>
Limited support: RENAME command is useful to rename one key as another key.
This is currently a best-effort mechanism and is intended to only work when there is
no concurrent updates to either the source or the destination keys. The TTL setting
for the key itself is copied over to the destination key. However, for container
types such as the TimeSeries type, the ttl settings for the sub-keys are not copied.

## Return Value
Returns status string.
## See Also
[`set`](../set/),
[`get`](../get/),
[`hset`](../hset/),
[`hget`](../hget/),
49 changes: 49 additions & 0 deletions docs/content/latest/yedis/api/setex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: SETEX
linkTitle: SETEX
description: SETEX
menu:
latest:
parent: api-redis
weight: 2271
aliases:
- /latest/api/redis/setex
- /latest/api/yedis/setex
isTocNested: true
showAsideToc: true
---

## Synopsis
<b>`SETEX key ttl_in_sec string_value`</b><br>
This command sets the value of `key` to be `string_value`, and sets the key to expire in `ttl_in_sec` seconds.

## Return Value
Returns status string.

## Examples

```sh
$ SETEX yugakey 10 "YugaByte"
```

```
"OK"
```

```sh
$ GET yugakey
```

```
"YugaByte"
```
```sh
$ TTL yugakey
```

```
(integer) 10
```

## See Also
[`append`](../append/), [`set`](../set/), [`psetex`](../psetex/), [`get`](../get/), [`getrange`](../getrange/), [`getset`](../getset/), [`incr`](../incr/), [`incrby`](../incrby/), [`setrange`](../setrange/), [`strlen`](../strlen/)

0 comments on commit 1e12f2c

Please sign in to comment.