redisMove: Move the specified key/value pair to another database.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/allValCMD.R

Description

Move the specified key/value pair in the currently selected database to another database.

Usage

1
redisMove(key, dbindex)

Arguments

key

The key to move.

dbindex

The destination database index number.

Details

This command returns TRUE only if the key was successfully moved, and FALSE if the target key was already there or if the source key was not found at all. It is possible to use redisMove as a locking primitive.

Value

Returns TRUE if the key/value pair was moved, or FALSE otherwise.

Author(s)

B. W. Lewis

References

http://redis.io/commands

See Also

redisSelect

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
redisConnect()
redisSelect(1)
redisSet('x',5)
redisMove('x',2)
redisSelect(2)
redisGet('x')

## End(Not run)

rredis documentation built on May 2, 2019, 2:02 p.m.