Mhgetdel
Bun

method

RedisClient.hgetdel

key: KeyLike,
fieldsKeyword: 'FIELDS',
numfields: number,
...fields: KeyLike[]
): Promise<null | string[]>;

Get and delete one or more hash fields (Redis 8.0.0+) Syntax: HGETDEL key FIELDS numfields field [field ...]

@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