This commit is contained in:
eson 2023-09-01 13:28:35 +08:00
parent 0855abae7f
commit 8337900423

View File

@ -57,7 +57,7 @@ func (mquery *ModuleQuery) EncodeQuery(field string) string {
var qstr []byte = []byte("JSON_OBJECT(")
for query := range mquery.ModuleQuery {
qstr = append(qstr, []byte(fmt.Sprintf("'%s.%s', %s ->> $.%s,", mquery.ModuleName, query, field, query))...)
qstr = append(qstr, []byte(fmt.Sprintf("'%s.%s',%s ->> '$.%s',", mquery.ModuleName, query, field, query))...)
}
if qstr[len(qstr)-1] == ',' {
qstr[len(qstr)-1] = ')'