Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

redisRename

Rename a key.


Description

Atomically rename a key.

Usage

redisRename(old, new, NX = FALSE)

Arguments

old

Original key name.

new

New key name.

NX

Set NX = TRUE to prevent overwriting a key that already exists.

Details

If the source and destination name are the same an error is returned. If newkey already exists it is overwritten unless NX = TRUE, in which case the operation fails.

Value

Returns the Redis status "OK" unless NX = TRUE. When NX = TRUE, returns 1 if successful, 0 otherwise.

Author(s)

B. W. Lewis

References

http://redis.io

See Also

Examples

## Not run: 
redisConnect()
redisSet('x',5)
redisRename('x','y')

## End(Not run)

rredis

"Redis" Key/Value Database Client

v1.7.0
Apache License (>= 2.0)
Authors
B. W. Lewis
Initial release
2015-07-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.