1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-03 04:01:40 +03:00
Files
node-redis/packages/json/lib/commands/MSET.ts
shacharPash e4fa7320ef indentation
2023-05-21 17:25:54 +03:00

23 lines
657 B
TypeScript

import { RedisJSON, transformRedisJsonArgument} from '.';
import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands';
export const FIRST_KEY_INDEX = 1;
export interface KeyPathValue {
key: RedisCommandArgument;
path: RedisCommandArgument;
value: RedisJSON;
}
export function transformArguments(keyPathValues: Array<KeyPathValue>): RedisCommandArguments {
const args: RedisCommandArguments = ['JSON.MSET'];
for (const { key, path, value } of keyPathValues) {
args.push(key, path, transformRedisJsonArgument(value));
}
return args;
}
export declare function transformReply(): 'OK';