objvalue marshalling 수정
This commit is contained in:
@ -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, b)
|
pl.Do(rh.ctx, "JSON.SET", key, path, fmt.Sprintf("'%s'", string(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,
|
||||||
b,
|
fmt.Sprintf("'%s'", string(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, bt)
|
args = append(args, fmt.Sprintf("'%s'", string(bt)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return args
|
return args
|
||||||
|
|||||||
Reference in New Issue
Block a user