1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00

time-series

This commit is contained in:
Leibale
2023-07-11 13:11:13 -04:00
parent c515bc9571
commit 54c3a66c72
32 changed files with 879 additions and 933 deletions

View File

@@ -1,6 +1,23 @@
import { TimeSeriesAggregationType } from '.';
import { RedisArgument, SimpleStringReply, Command } from '@redis/client/dist/lib/RESP/types';
export const TIME_SERIES_AGGREGATION_TYPE = {
AVG: 'AVG',
FIRST: 'FIRST',
LAST: 'LAST',
MIN: 'MIN',
MAX: 'MAX',
SUM: 'SUM',
RANGE: 'RANGE',
COUNT: 'COUNT',
STD_P: 'STD.P',
STD_S: 'STD.S',
VAR_P: 'VAR.P',
VAR_S: 'VAR.S',
TWA: 'TWA'
} as const;
export type TimeSeriesAggregationType = typeof TIME_SERIES_AGGREGATION_TYPE[keyof typeof TIME_SERIES_AGGREGATION_TYPE];
export default {
FIRST_KEY_INDEX: 1,
IS_READ_ONLY: false,
@@ -20,7 +37,7 @@ export default {
bucketDuration.toString()
];
if (alignTimestamp) {
if (alignTimestamp !== undefined) {
args.push(alignTimestamp.toString());
}