| 1 |
import { pushRetentionArgument, Labels, pushLabelsArgument, TimeSeriesDuplicatePolicies, pushChunkSizeArgument, pushDuplicatePolicy } from '.'; |
| 2 |
|
| 3 |
export const FIRST_KEY_INDEX = 1; |
| 4 |
|
| 5 |
interface AlterOptions { |
| 6 |
RETENTION?: number; |
| 7 |
CHUNK_SIZE?: number; |
| 8 |
DUPLICATE_POLICY?: TimeSeriesDuplicatePolicies; |
| 9 |
LABELS?: Labels; |
| 10 |
} |
| 11 |
|
| 12 |
export function transformArguments(key: string, options?: AlterOptions): Array<string> { |
| 13 |
const args = ['TS.ALTER', key]; |
| 14 |
|
| 15 |
pushRetentionArgument(args, options?.RETENTION); |
| 16 |
|
| 17 |
pushChunkSizeArgument(args, options?.CHUNK_SIZE); |
| 18 |
|
| 19 |
pushDuplicatePolicy(args, options?.DUPLICATE_POLICY); |
| 20 |
|
| 21 |
pushLabelsArgument(args, options?.LABELS); |
| 22 |
|
| 23 |
return args; |
| 24 |
} |
| 25 |
|
| 26 |
export declare function transformReply(): 'OK'; |