1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-03 04:01:40 +03:00
Files
node-redis/packages/json/lib/commands/DEBUG_MEMORY.ts
Leibale ebca66d6f6 WIP
2023-11-01 14:09:58 -04:00

21 lines
536 B
TypeScript

import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';
export interface JsonDebugMemoryOptions {
path?: RedisArgument;
}
export default {
FIRST_KEY_INDEX: 2,
IS_READ_ONLY: false,
transformArguments(key: RedisArgument, options?: JsonDebugMemoryOptions) {
const args = ['JSON.DEBUG', 'MEMORY', key];
if (options?.path !== undefined) {
args.push(options.path);
}
return args;
},
transformReply: undefined as unknown as () => NumberReply
} as const satisfies Command;