| 1 | import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands'; |
| 2 | import { pushVerdictArgument } from '@redis/client/dist/lib/commands/generic-transformers'; |
| 3 | import { CompressionOption, pushCompressionArgument } from '.'; |
| 4 | |
| 5 | export const FIRST_KEY_INDEX = 1; |
| 6 | |
| 7 | interface MergeOptions extends CompressionOption { |
| 8 | OVERRIDE?: boolean; |
| 9 | } |
| 10 | |
| 11 | export function transformArguments( |
| 12 | destKey: RedisCommandArgument, |
| 13 | srcKeys: RedisCommandArgument | Array<RedisCommandArgument>, |
| 14 | options?: MergeOptions |
| 15 | ): RedisCommandArguments { |
| 16 | const args = pushVerdictArgument( |
| 17 | ['TDIGEST.MERGE', destKey], |
| 18 | srcKeys |
| 19 | ); |
| 20 | |
| 21 | pushCompressionArgument(args, options); |
| 22 | |
| 23 | if (options?.OVERRIDE) { |
| 24 | args.push('OVERRIDE'); |
| 25 | } |
| 26 | |
| 27 | return args; |
| 28 | } |
| 29 | |
| 30 | export declare function transformReply(): 'OK'; |