1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/packages/json/lib/commands/MSET.ts
shacharPash 319af5b566 review
2023-05-18 13:07:00 +03:00

23 lines
643 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: string;
value: RedisJSON;
}
export function transformArguments(keyPathValues: Array<KeyPathValue>): RedisCommandArguments {
const args: RedisCommandArguments = ['JSON.MSET'];
keyPathValues.forEach(({ key, path, value }) => {
args.push(key, path, transformRedisJsonArgument(value));
});
return args;
}
export declare function transformReply(): 'OK';