hkeys #
Returns all field names contained in a hash.
Arguments #
hkeys(key, [options]);
Arguments | Type | Description |
---|---|---|
key | string | Hash key |
options | object | Optional query arguments |
options #
The options
arguments can contain the following option properties:
Property | Type (default) | Description |
---|---|---|
queuable | boolean (true) | If true, queues the request during downtime, until connected to Kuzzle again |
Resolve #
Resolves to an array of hash field names.
Usage #
try {
await kuzzle.ms.hset('hashfoo', 'never', 'foo');
await kuzzle.ms.hset('hashfoo', 'gonna', 'bar');
await kuzzle.ms.hset('hashfoo', 'give you up', 'baz');
// Prints: ['never', 'gonna', 'give you up']
console.log(await kuzzle.ms.hkeys('hashfoo'));
} catch (error) {
console.error(error.message);
}
Edit this page on Github (opens new window)