@@ -134,57 +134,57 @@ var cases = [][]string{
134
134
var psqlCases = [][]string {
135
135
{
136
136
`{ "glue":"and", "rules":[{ "field": "json:cfg.a", "condition":{ "type":"equal", "filter":1 }}]}` ,
137
- "(cfg->'a')::text = $1" ,
137
+ "(\" cfg\" ->'a')::text = $1" ,
138
138
"1" ,
139
139
},
140
140
{
141
- `{ "glue":"and", "rules":[{ "field": "json: mytable.cfg.a", "condition":{ "type":"equal", "filter":1 }}]}` ,
142
- "(\" mytable\" .cfg->'a')::text = $1" ,
141
+ `{ "glue":"and", "rules":[{ "field": "mytable.json: cfg.a", "condition":{ "type":"equal", "filter":1 }}]}` ,
142
+ "(\" mytable\" .\" cfg\" ->'a')::text = $1" ,
143
143
"1" ,
144
144
},
145
145
{
146
146
`{ "glue":"and", "rules":[{ "field": "json:cfg.b:numeric", "condition":{ "type":"notEqual", "filter":1 }}]}` ,
147
- "(cfg->'b')::numeric <> $1" ,
147
+ "(\" cfg\" ->'b')::numeric <> $1" ,
148
148
"1" ,
149
149
},
150
150
{
151
151
`{ "glue":"and", "rules":[{ "field": "json:cfg.b:numeric", "condition":{ "type":"less", "filter":1 }}]}` ,
152
- "(cfg->'b')::numeric < $1" ,
152
+ "(\" cfg\" ->'b')::numeric < $1" ,
153
153
"1" ,
154
154
},
155
155
{
156
156
`{ "glue":"and", "rules":[{ "field": "json:cfg.b:numeric", "condition":{ "type":"lessOrEqual", "filter":1 }}]}` ,
157
- "(cfg->'b')::numeric <= $1" ,
157
+ "(\" cfg\" ->'b')::numeric <= $1" ,
158
158
"1" ,
159
159
},
160
160
{
161
161
`{ "glue":"and", "rules":[{ "field": "json:cfg.b:numeric", "condition":{ "type":"greater", "filter":1 }}]}` ,
162
- "(cfg->'b')::numeric > $1" ,
162
+ "(\" cfg\" ->'b')::numeric > $1" ,
163
163
"1" ,
164
164
},
165
165
{
166
166
`{ "glue":"and", "rules":[{ "field": "json:cfg.b:numeric", "condition":{ "type":"greaterOrEqual", "filter":1 }}]}` ,
167
- "(cfg->'b')::numeric >= $1" ,
167
+ "(\" cfg\" ->'b')::numeric >= $1" ,
168
168
"1" ,
169
169
},
170
170
{
171
171
`{ "glue":"and", "rules":[{ "field": "json:cfg.a", "condition":{ "type":"contains", "filter":1 }}]}` ,
172
- "(cfg->'a')::text LIKE '\" %' || $1 || '%\" '" ,
172
+ "(\" cfg\" ->'a')::text LIKE '\" %' || $1 || '%\" '" ,
173
173
"1" ,
174
174
},
175
175
{
176
176
`{ "glue":"and", "rules":[{ "field": "json:cfg.a", "condition":{ "type":"notContains", "filter":1 }}]}` ,
177
- "(cfg->'a')::text NOT LIKE '\" %' || $1 || '%\" '" ,
177
+ "(\" cfg\" ->'a')::text NOT LIKE '\" %' || $1 || '%\" '" ,
178
178
"1" ,
179
179
},
180
180
{
181
181
`{ "glue":"and", "rules":[{ "field": "json:cfg.c:date", "condition":{ "type":"equal", "filter":"2006/01/02" }}]}` ,
182
- "CAST((cfg->'c')::text AS DATE) = $1" ,
182
+ "CAST((\" cfg\" ->'c')::text AS DATE) = $1" ,
183
183
`2006/01/02` ,
184
184
},
185
185
{
186
186
`{ "glue":"and", "rules":[{ "field": "json:cfg.c:date", "condition":{ "type":"notBetween", "filter":{ "start":"2006/01/02", "end":"2006/01/9" } }}]}` ,
187
- "( CAST((cfg->'c')::text AS DATE) < $1 OR CAST((cfg->'c')::text AS DATE) > $2 )" ,
187
+ "( CAST((\" cfg\" ->'c')::text AS DATE) < $1 OR CAST((\" cfg\" ->'c')::text AS DATE) > $2 )" ,
188
188
`2006/01/02,2006/01/9` ,
189
189
},
190
190
}
0 commit comments