json value 다시 되돌림

This commit is contained in:
2023-07-16 17:29:21 +09:00
parent aa568ec3fa
commit 272c696c59

View File

@ -65,7 +65,7 @@ func (rh *RedisonHandler) JSONMSet(key string, kv map[string]any) error {
if err != nil { if err != nil {
return err return err
} }
pl.Do(rh.ctx, "JSON.SET", key, path, fmt.Sprintf("'%s'", string(b))) pl.Do(rh.ctx, "JSON.SET", key, path, b)
} }
cmders, err := pl.Exec(rh.ctx) cmders, err := pl.Exec(rh.ctx)
@ -91,7 +91,7 @@ func (rh *RedisonHandler) JSONSet(key, path string, obj any, opts ...SetOption)
"JSON.SET", "JSON.SET",
key, key,
path, path,
fmt.Sprintf("'%s'", string(b)), b,
} }
if len(opts) > 0 { if len(opts) > 0 {
args = append(args, opts[0]) args = append(args, opts[0])
@ -266,7 +266,7 @@ func appendValues(args []any, values ...any) []any {
args = append(args, jsonValue) args = append(args, jsonValue)
default: default:
bt, _ := json.Marshal(jsonValue) bt, _ := json.Marshal(jsonValue)
args = append(args, fmt.Sprintf("'%s'", string(bt))) args = append(args, bt)
} }
} }
return args return args