You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
add JSON.MSET to args
This commit is contained in:
@@ -12,11 +12,12 @@ export function transformArguments(keyPathValues: Array<KeyPathValue>): Array<st
|
||||
if (keyPathValues.length === 0) {
|
||||
throw new Error('ERR wrong number of arguments for \'MSET\' command');
|
||||
}
|
||||
const args: string[] = keyPathValues.flatMap(({ key, path, value }) => [
|
||||
key,
|
||||
path,
|
||||
transformRedisJsonArgument(value)
|
||||
]);
|
||||
|
||||
const args: string[] = ['JSON.MSET'];
|
||||
|
||||
keyPathValues.forEach(({ key, path, value }) => {
|
||||
args.push(key, path, transformRedisJsonArgument(value));
|
||||
});
|
||||
|
||||
return args;
|
||||
}
|
||||
|
Reference in New Issue
Block a user