hstrlen

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

// Using promises (NodeJS only)
kuzzle.memoryStorage.hstrlenPromise('key', 'field')
  .then(length => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.hstrlen("key", "field", new ResponseListener<Long>() {
  @Override
  public void onSuccess(int length) {
    // callback called once the action has completed
  }

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

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $length = $kuzzle->memoryStorage()->hstrlen('key', 'field');
}
catch (ErrorException $e) {

}

Callback response:

3

Returns the string length of a field’s value in a hash.

[Redis documentation]


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

ArgumentsTypeDescription
keystringKey identifier
fieldstringHash field name
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to the string length of a field's value.