hexists

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

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

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

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $exists = $kuzzle->memoryStorage()->hexists('key', 'field1');
}
catch (ErrorException $e) {

}

Callback response:

1

Checks if a field exists in a hash.

[Redis documentation]


hexists(key, field, [options], callback)

ArgumentsTypeDescription
keystringKey identifier
fieldstringField name
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

1 if field exists, 0 otherwise.