RENAMENX
Since 1.1.0Keys
Syntax
RENAMENX source destinationRenames source to destination only if destination does not exist.
Reply
1if the key was renamed.0ifdestinationexists; nothing changes.ERR no such keyifsourcedoes not exist.
Examples
> SET r2 v
OK
> SET r3 v
OK
> RENAMENX r2 r3
(integer) 0
> RENAMENX r2 r4
(integer) 1