You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
HSCAN NOVALUES support (v5) (#2758)
* HSCAN VALUES support (v5) * add hscanNoValuesIterator * nitpick --------- Co-authored-by: Leibale Eidelman <me@leibale.com>
This commit is contained in:
22
packages/client/lib/commands/HSCAN_NOVALUES.ts
Normal file
22
packages/client/lib/commands/HSCAN_NOVALUES.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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;
|
Reference in New Issue
Block a user