You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
28 lines
773 B
TypeScript
28 lines
773 B
TypeScript
import { RedisCommandArgument, RedisCommandArguments } from '.';
|
|
import { ScanOptions } from './generic-transformers';
|
|
import { HScanRawReply, transformArguments as transformHScanArguments } from './HSCAN';
|
|
|
|
export { FIRST_KEY_INDEX, IS_READ_ONLY } from './HSCAN';
|
|
|
|
export function transformArguments(
|
|
key: RedisCommandArgument,
|
|
cursor: number,
|
|
options?: ScanOptions
|
|
): RedisCommandArguments {
|
|
const args = transformHScanArguments(key, cursor, options);
|
|
args.push('NOVALUES');
|
|
return args;
|
|
}
|
|
|
|
interface HScanNoValuesReply {
|
|
cursor: number;
|
|
keys: Array<RedisCommandArgument>;
|
|
}
|
|
|
|
export function transformReply([cursor, rawData]: HScanRawReply): HScanNoValuesReply {
|
|
return {
|
|
cursor: Number(cursor),
|
|
keys: rawData
|
|
};
|
|
}
|