1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
This commit is contained in:
Leibale
2023-07-27 11:23:34 -04:00
parent 61c3e8b95b
commit ff07bbf3d3
25 changed files with 745 additions and 630 deletions

View File

@@ -1,24 +1,9 @@
import { RedisCommandArguments } from '@redis/client/dist/lib/commands';
import { RangeOptions, Timestamp, pushRangeArguments, SampleRawReply, SampleReply, transformRangeReply } from '.';
import { Command } from '@redis/client/dist/lib/RESP/types';
import RANGE, { transformRangeArguments } from './RANGE';
export const FIRST_KEY_INDEX = 1;
export const IS_READ_ONLY = true;
export function transformArguments(
key: string,
fromTimestamp: Timestamp,
toTimestamp: Timestamp,
options?: RangeOptions
): RedisCommandArguments {
return pushRangeArguments(
['TS.REVRANGE', key],
fromTimestamp,
toTimestamp,
options
);
}
export function transformReply(reply: Array<SampleRawReply>): Array<SampleReply> {
return transformRangeReply(reply);
}
export default {
FIRST_KEY_INDEX: RANGE.FIRST_KEY_INDEX,
IS_READ_ONLY: RANGE.IS_READ_ONLY,
transformArguments: transformRangeArguments.bind(undefined, 'TS.REVRANGE'),
transformReply: RANGE.transformReply
} as const satisfies Command;