smove

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.smove('key', 'destination', 'member', function (err, status) {
  // callback called once the action has completed
});

// Using promises (NodeJS only)
kuzzle.memoryStorage.smovePromise('key', 'destination', 'member')
  .then(status => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.smove("key", "destination", "member", new ResponseListener<Integer>() {
  @Override
  public void onSuccess(int status) {
    // callback called once the action has completed
  }

  @Override
  public void onError(JSONObject error) {
  }
});
<?php

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $status = $kuzzle->memoryStorage()->smove('key', 'destination', 'member');
}
catch (ErrorException $e) {

}

Callback response:

1

Moves a member from a set of unique values to another.

[Redis documentation]


smove(key, destination, member, [options], [callback])

ArgumentsTypeDescription
keystringSource key identifier
destinationstringDestination key identifier
memberstringMember to be moved
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Return value

Returns the MemoryStorage object to allow chaining.


Callback response

Resolves to an integer containing the operation status (0: fail, 1: success).