SMOVE

Since 1.1.0Sets

Syntax

SMOVE source destination member
  • Flags: fast, write
  • ACL categories: @fast, @set, @write
  • Arity: 4

Moves member from the set at source to the set at destination, in one step.

Reply

  • 1 if the member was moved.
  • 0 if it was not in source; nothing changes.

Examples

> SADD x a b
(integer) 2
> SMOVE x y a
(integer) 1
> SISMEMBER y a
(integer) 1
> SMOVE x y nope
(integer) 0