You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
wip
This commit is contained in:
@@ -1,24 +1,20 @@
|
||||
// import { RedisCommandArgument, RedisCommandArguments } from '.';
|
||||
import { RedisArgument, ArrayReply, TuplesReply, BlobStringReply, SetReply, Command } from '../RESP/types';
|
||||
|
||||
// export const IS_READ_ONLY = true;
|
||||
export type CommandGetKeysAndFlagsRawReply = ArrayReply<TuplesReply<[
|
||||
key: BlobStringReply,
|
||||
flags: SetReply<BlobStringReply>
|
||||
]>>;
|
||||
|
||||
// export function transformArguments(args: Array<RedisCommandArgument>): RedisCommandArguments {
|
||||
// return ['COMMAND', 'GETKEYSANDFLAGS', ...args];
|
||||
// }
|
||||
|
||||
// type KeysAndFlagsRawReply = Array<[
|
||||
// RedisCommandArgument,
|
||||
// RedisCommandArguments
|
||||
// ]>;
|
||||
|
||||
// type KeysAndFlagsReply = Array<{
|
||||
// key: RedisCommandArgument;
|
||||
// flags: RedisCommandArguments;
|
||||
// }>;
|
||||
|
||||
// export function transformReply(reply: KeysAndFlagsRawReply): KeysAndFlagsReply {
|
||||
// return reply.map(([key, flags]) => ({
|
||||
// key,
|
||||
// flags
|
||||
// }));
|
||||
// }
|
||||
export default {
|
||||
FIRST_KEY_INDEX: undefined,
|
||||
IS_READ_ONLY: true,
|
||||
transformArguments(args: Array<RedisArgument>) {
|
||||
return ['COMMAND', 'GETKEYSANDFLAGS', ...args];
|
||||
},
|
||||
transformReply(reply: CommandGetKeysAndFlagsRawReply) {
|
||||
return reply.map(([key, flags]) => ({
|
||||
key,
|
||||
flags
|
||||
}));
|
||||
}
|
||||
} as const satisfies Command;
|
||||
|
Reference in New Issue
Block a user