| 1 |
import { RedisCommandArguments } from '@redis/client/dist/lib/commands'; |
| 2 |
import { RangeOptions, Timestamp, pushRangeArguments, SampleRawReply, SampleReply, transformRangeReply } from '.'; |
| 3 |
|
| 4 |
export const FIRST_KEY_INDEX = 1; |
| 5 |
|
| 6 |
export const IS_READ_ONLY = true; |
| 7 |
|
| 8 |
export function transformArguments( |
| 9 |
key: string, |
| 10 |
fromTimestamp: Timestamp, |
| 11 |
toTimestamp: Timestamp, |
| 12 |
options?: RangeOptions |
| 13 |
): RedisCommandArguments { |
| 14 |
return pushRangeArguments( |
| 15 |
['TS.RANGE', key], |
| 16 |
fromTimestamp, |
| 17 |
toTimestamp, |
| 18 |
options |
| 19 |
); |
| 20 |
} |
| 21 |
|
| 22 |
export function transformReply(reply: Array<SampleRawReply>): Array<SampleReply> { |
| 23 |
return transformRangeReply(reply); |
| 24 |
} |