1
0
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:
Shaya Potter
2024-06-03 17:16:07 +03:00
committed by GitHub
parent 31c881e90e
commit 271baf3a65
4 changed files with 94 additions and 0 deletions

View 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;