You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
WIP
This commit is contained in:
@@ -1,12 +1,27 @@
|
||||
// import { RedisCommandArgument, RedisCommandArguments } from '.';
|
||||
import { RedisArgument, TuplesReply, BlobStringReply, DoubleReply, Command } from '../RESP/types';
|
||||
|
||||
// export const FIRST_KEY_INDEX = 1;
|
||||
export default {
|
||||
FIRST_KEY_INDEX: 1,
|
||||
IS_READ_ONLY: false,
|
||||
transformArguments(key: RedisArgument) {
|
||||
return ['ZPOPMIN', key];
|
||||
},
|
||||
transformReply: {
|
||||
2: (reply: TuplesReply<[]> | TuplesReply<[BlobStringReply, BlobStringReply]>) => {
|
||||
if (reply.length === 0) return null;
|
||||
|
||||
// export function transformArguments(key: RedisCommandArgument): RedisCommandArguments {
|
||||
// return [
|
||||
// 'ZPOPMIN',
|
||||
// key
|
||||
// ];
|
||||
// }
|
||||
return {
|
||||
value: reply[0],
|
||||
score: Number(reply[1])
|
||||
};
|
||||
},
|
||||
3: (reply: TuplesReply<[]> | TuplesReply<[BlobStringReply, DoubleReply]>) => {
|
||||
if (reply.length === 0) return null;
|
||||
|
||||
// export { transformSortedSetMemberNullReply as transformReply } from './generic-transformers';
|
||||
return {
|
||||
value: reply[0],
|
||||
score: reply[1]
|
||||
};
|
||||
}
|
||||
}
|
||||
} as const satisfies Command;
|
||||
|
Reference in New Issue
Block a user