You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
29 lines
617 B
TypeScript
29 lines
617 B
TypeScript
import { TimeSeriesAggregationType } from '.';
|
|
|
|
export const FIRST_KEY_INDEX = 1;
|
|
|
|
export function transformArguments(
|
|
sourceKey: string,
|
|
destinationKey: string,
|
|
aggregationType: TimeSeriesAggregationType,
|
|
bucketDuration: number,
|
|
alignTimestamp?: number
|
|
): Array<string> {
|
|
const args = [
|
|
'TS.CREATERULE',
|
|
sourceKey,
|
|
destinationKey,
|
|
'AGGREGATION',
|
|
aggregationType,
|
|
bucketDuration.toString()
|
|
];
|
|
|
|
if (alignTimestamp) {
|
|
args.push(alignTimestamp.toString());
|
|
}
|
|
|
|
return args;
|
|
}
|
|
|
|
export declare function transformReply(): 'OK';
|