Available since 1.0.0.

MOVE key db

Move key from the currently selected database (see SELECT) to the specified destination database. When key already exists in the destination database, or it does not exist in the source database, it does nothing. It is possible to use MOVE as a locking primitive because of this.

NOTE: The primary developer of unit-redis-ness is not smart enough to know what is a "locking primitive," so don't rely on this being a usable scenario

Return value
Integer reply, specifically:

1 if key was moved. 0 if key was not moved.

Hierarchy

Constructors

Properties

blocking?: boolean
dataType?: DataType

Used for "database" commands to enforce type checking.

logger: Logger = ...
maxParams: number = 2

Maximum number of parameters allowed. -1 for no maximum.

minParams: number = 2

Minimum number of parameters require.

name: string = "move"
pubSubAllowed?: boolean

Used when PUB/SUB is in effect.

sign?: number

Sign is used in commands with a compliment command. The only current example is INCR/DECR. Sign is 1 for INCR and -1 for DECR

txIgnore?: boolean

Used in transactions to enqueue a command.

Methods