You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
RedisJSON
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { RedisArgument, Command, NullReply, NumberReply, ArrayReply } from '@redis/client/dist/lib/RESP/types';
|
||||
import { transformRedisJsonArgument } from '.';
|
||||
|
||||
export interface JsonStrAppendOptions {
|
||||
path?: RedisArgument;
|
||||
@@ -7,14 +8,14 @@ export interface JsonStrAppendOptions {
|
||||
export default {
|
||||
FIRST_KEY_INDEX: 1,
|
||||
IS_READ_ONLY: false,
|
||||
transformArguments(key: RedisArgument, append: RedisArgument, options?: JsonStrAppendOptions) {
|
||||
transformArguments(key: RedisArgument, append: string, options?: JsonStrAppendOptions) {
|
||||
const args = ['JSON.STRAPPEND', key];
|
||||
|
||||
if (options?.path) {
|
||||
if (options?.path !== undefined) {
|
||||
args.push(options.path);
|
||||
}
|
||||
|
||||
args.push(append);
|
||||
args.push(transformRedisJsonArgument(append));
|
||||
return args;
|
||||
},
|
||||
transformReply: undefined as unknown as () => NumberReply | ArrayReply<NullReply | NumberReply>
|
||||
|
Reference in New Issue
Block a user