1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00
Files
node-redis/packages/client/lib/commands/HSCAN_NOVALUES.ts
Shaya Potter 271baf3a65 HSCAN NOVALUES support (v5) (#2758)
* HSCAN VALUES support (v5)

* add hscanNoValuesIterator

* nitpick

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2024-06-03 10:16:07 -04:00

23 lines
588 B
TypeScript

import { RedisArgument, BlobStringReply, Command } from '../RESP/types';
import { ScanCommonOptions, pushScanArguments } from './SCAN';
export default {
FIRST_KEY_INDEX: 1,
IS_READ_ONLY: true,
transformArguments(
key: RedisArgument,
cursor: RedisArgument,
options?: ScanCommonOptions
) {
const args = pushScanArguments(['HSCAN', key], cursor, options);
args.push('NOVALUES');
return args;
},
transformReply([cursor, fields]: [BlobStringReply, Array<BlobStringReply>]) {
return {
cursor,
fields
};
}
} as const satisfies Command;