Rename a key.
Atomically rename a key.
redisRename(old, new, NX = FALSE)
old |
Original key name. |
new |
New key name. |
NX |
Set NX = TRUE to prevent overwriting a key that already exists. |
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.
Returns the Redis status "OK" unless NX = TRUE
. When
NX = TRUE
, returns 1 if successful, 0 otherwise.
B. W. Lewis
http://redis.io
## Not run: redisConnect() redisSet('x',5) redisRename('x','y') ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.