1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00
This commit is contained in:
Leibale
2023-05-10 12:08:02 +03:00
parent d59254e497
commit b4196faa41
12 changed files with 244 additions and 139 deletions

View File

@@ -1,22 +1,6 @@
// import { RedisCommandArguments } from '.';
// import { transformArguments as transformZInterArguments } from './ZINTER';
// export { FIRST_KEY_INDEX, IS_READ_ONLY } from './ZINTER';
// export function transformArguments(...args: Parameters<typeof transformZInterArguments>): RedisCommandArguments {
// return [
// ...transformZInterArguments(...args),
// 'WITHSCORES'
// ];
// }
// // transformSortedSetWithScoresReply
import { ArrayReply, BlobStringReply, Command, DoubleReply } from '../RESP/types';
import { Command } from '../RESP/types';
import ZINTER from './ZINTER';
import { transformSortedSetWithScoresReply } from './generic-transformers';
import { transformSortedSetReply } from './generic-transformers';
export default {
FIRST_KEY_INDEX: ZINTER.FIRST_KEY_INDEX,
@@ -26,13 +10,5 @@ export default {
redisArgs.push('WITHSCORES');
return redisArgs;
},
transformReply: {
2: transformSortedSetWithScoresReply,
3: (reply: ArrayReply<[BlobStringReply, DoubleReply]>) => {
return reply.map(([member, score]) => ({
member,
score
}));
}
}
transformReply: transformSortedSetReply
} as const satisfies Command;