Available since 1.0.0.

SMOVE source destination member

Move member from the set at source to the set at destination. Unlike the original implementation, this operation is NOT atomic. The key will be removed from the source set before it is added to the destination set.

If the source set does not exist or does not contain the specified element, no operation is performed and 0 is returned. Otherwise, the element is removed from the source set and added to the destination set. When the specified element already exists in the destination set, it is only removed from the source set.

An error is returned if source or destination does not hold a set value.

Return value
Integer reply, specifically:

1 if the element is moved. 0 if the element is not a member of source and no operation was performed.

Hierarchy

Constructors

Properties

DbDataType: DataType = DataType.SET
blocking?: boolean
dataType?: DataType

Used for "database" commands to enforce type checking.

logger: Logger = ...
maxParams: number = 3

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

minParams: number = 3

Minimum number of parameters require.

name: string = "smove"
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