1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/packages/time-series/lib/commands/MADD.ts
2021-11-29 08:52:14 -05:00

24 lines
521 B
TypeScript

import { Timestamp, transformTimestampArgument } from '.';
interface MAddSample {
key: string;
timestamp: Timestamp;
value: number;
}
export function transformArguments(toAdd: Array<MAddSample>): Array<string> {
const args = ['TS.MADD'];
for (const { key, timestamp, value } of toAdd) {
args.push(
key,
transformTimestampArgument(timestamp),
value.toString()
);
}
return args;
}
export declare function transformReply(): Array<number>;