Get and delete one or more hash fields (Redis 8.0.0+) Syntax: HGETDEL key FIELDS numfields field [field ...]
method
RedisClient.hgetdel
fieldsKeyword: 'FIELDS',
numfields: number,
): Promise<null | string[]>;
@param key
The hash key
@param fieldsKeyword
Must be the literal string "FIELDS"
@param numfields
Number of fields to follow
@param fields
The field names to get and delete
@returns
Promise that resolves with array of field values (null for non-existent fields)
redis.hgetdel("mykey", "FIELDS", 2, "field1", "field2")
Referenced types
type KeyLike = string | ArrayBufferView | Blob