Mhscan
Bun

method

RedisClient.hscan

key: KeyLike,
cursor: string | number
): Promise<[string, string[]]>;

Incrementally iterate hash fields and values

@param key

The hash key

@param cursor

The cursor value (0 to start iteration)

@returns

Promise that resolves with [next_cursor, [field1, value1, field2, value2, ...]]

key: KeyLike,
cursor: string | number,
match: 'MATCH',
pattern: string
): Promise<[string, string[]]>;

Incrementally iterate hash fields and values with pattern matching

@param key

The hash key

@param cursor

The cursor value (0 to start iteration)

@param match

Literal "MATCH"

@param pattern

Pattern to match field names against

@returns

Promise that resolves with [next_cursor, [field1, value1, field2, value2, ...]]

key: KeyLike,
cursor: string | number,
count: 'COUNT',
limit: number
): Promise<[string, string[]]>;

Incrementally iterate hash fields and values with count limit

@param key

The hash key

@param cursor

The cursor value (0 to start iteration)

@param count

Literal "COUNT"

@param limit

Maximum number of fields to return per call

@returns

Promise that resolves with [next_cursor, [field1, value1, field2, value2, ...]]

key: KeyLike,
cursor: string | number,
match: 'MATCH',
pattern: string,
count: 'COUNT',
limit: number
): Promise<[string, string[]]>;

Incrementally iterate hash fields and values with pattern and count

@param key

The hash key

@param cursor

The cursor value (0 to start iteration)

@param match

Literal "MATCH"

@param pattern

Pattern to match field names against

@param count

Literal "COUNT"

@param limit

Maximum number of fields to return per call

@returns

Promise that resolves with [next_cursor, [field1, value1, field2, value2, ...]]

Referenced types

type KeyLike = string | ArrayBufferView | Blob