hdel

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.hdel('key', ['field1', 'field2'], function (err, count) {
  // callback called once the action has completed
});

// Using promises (NodeJS only)
kuzzle.memoryStorage.hdelPromise('key', ['field1', 'field2'])
  .then(count => {
    // resolved once the action has completed
  });
String[] fields = {"field1", "field2", "..."};

kuzzle.memoryStorage.hdel("key", fields, new ResponseListener<Long>() {
  @Override
  public void onSuccess(int count) {
    // callback called once the action has completed
  }

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

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $count = $kuzzle->memoryStorage()->hdel('key', ['field1', 'field2']);
}
catch (ErrorException $e) {

}

Callback response:

2

Removes fields from a hash.

[Redis documentation]


hdel(key, fields, [options], [callback])

ArgumentsTypeDescription
keystringKey identifier
fieldsarrayList of field names to delete
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 the number of removed fields.