105 #line 12 "sqljson.pgc"
108 #line 13 "sqljson.pgc"
111 #line 14 "sqljson.pgc"
116 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0);
117 #line 18 "sqljson.pgc"
120 #line 18 "sqljson.pgc"
123 #line 19 "sqljson.pgc"
126 #line 19 "sqljson.pgc"
130 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
132 #line 21 "sqljson.pgc"
135 #line 21 "sqljson.pgc"
137 printf(
"Found json=%s\n", json);
140 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
142 #line 24 "sqljson.pgc"
145 #line 24 "sqljson.pgc"
147 printf(
"Found json=%s\n", json);
150 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
152 #line 27 "sqljson.pgc"
155 #line 27 "sqljson.pgc"
157 printf(
"Found json=%s\n", json);
160 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
162 #line 30 "sqljson.pgc"
165 #line 30 "sqljson.pgc"
167 printf(
"Found json=%s\n", json);
170 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
172 #line 33 "sqljson.pgc"
175 #line 33 "sqljson.pgc"
179 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"select json_object ( 1 : 1 , '2' : null , 1 : '2' absent on null without unique keys )",
ECPGt_EOIT,
180 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
182 #line 36 "sqljson.pgc"
185 #line 36 "sqljson.pgc"
187 printf(
"Found json=%s\n", json);
189 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"select json_object ( 1 : 1 , '2' : null absent on null without unique returning jsonb )",
ECPGt_EOIT,
190 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
192 #line 39 "sqljson.pgc"
195 #line 39 "sqljson.pgc"
197 printf(
"Found json=%s\n", json);
200 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
202 #line 42 "sqljson.pgc"
205 #line 42 "sqljson.pgc"
207 printf(
"Found json=%s\n", json);
210 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
212 #line 45 "sqljson.pgc"
215 #line 45 "sqljson.pgc"
217 printf(
"Found json=%s\n", json);
220 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
222 #line 48 "sqljson.pgc"
225 #line 48 "sqljson.pgc"
230 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
232 #line 51 "sqljson.pgc"
235 #line 51 "sqljson.pgc"
237 printf(
"Found json=%s\n", json);
240 #line 54 "sqljson.pgc"
243 #line 54 "sqljson.pgc"
248 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
250 #line 57 "sqljson.pgc"
253 #line 57 "sqljson.pgc"
255 printf(
"Found json=%s\n", json);
258 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
260 #line 60 "sqljson.pgc"
263 #line 60 "sqljson.pgc"
268 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
270 #line 63 "sqljson.pgc"
273 #line 63 "sqljson.pgc"
275 printf(
"Found json=%s\n", json);
278 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
280 #line 66 "sqljson.pgc"
283 #line 66 "sqljson.pgc"
285 printf(
"Found json=%s\n", json);
288 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
290 #line 69 "sqljson.pgc"
293 #line 69 "sqljson.pgc"
295 printf(
"Found json=%s\n", json);
298 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
300 #line 72 "sqljson.pgc"
303 #line 72 "sqljson.pgc"
305 printf(
"Found json=%s\n", json);
308 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
310 #line 75 "sqljson.pgc"
313 #line 75 "sqljson.pgc"
315 printf(
"Found json=%s\n", json);
318 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
320 #line 78 "sqljson.pgc"
323 #line 78 "sqljson.pgc"
325 printf(
"Found json=%s\n", json);
328 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
330 #line 81 "sqljson.pgc"
333 #line 81 "sqljson.pgc"
335 printf(
"Found json=%s\n", json);
338 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
340 #line 84 "sqljson.pgc"
343 #line 84 "sqljson.pgc"
345 printf(
"Found json=%s\n", json);
348 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
350 #line 87 "sqljson.pgc"
353 #line 87 "sqljson.pgc"
355 printf(
"Found json=%s\n", json);
358 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
360 #line 90 "sqljson.pgc"
363 #line 90 "sqljson.pgc"
365 printf(
"Found json=%s\n", json);
368 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
370 #line 93 "sqljson.pgc"
373 #line 93 "sqljson.pgc"
375 printf(
"Found json=%s\n", json);
378 ECPGt_char,(json),(
long)1024,(
long)1,(1024)*
sizeof(
char),
380 #line 96 "sqljson.pgc"
383 #line 96 "sqljson.pgc"
385 printf(
"Found json=%s\n", json);
388 #line 99 "sqljson.pgc"
391 #line 99 "sqljson.pgc"
395 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"with val ( js ) as ( values ( '{ \"a\": 1, \"b\": [{ \"a\": 1, \"b\": 0, \"a\": 2 }] }' ) ) select js is json \"IS JSON\" , js is not json \"IS NOT JSON\" , js is json value \"IS VALUE\" , js is json object \"IS OBJECT\" , js is json array \"IS ARRAY\" , js is json scalar \"IS SCALAR\" , js is json without unique keys \"WITHOUT UNIQUE\" , js is json with unique keys \"WITH UNIQUE\" from val",
ECPGt_EOIT,
396 ECPGt_bool,&(is_json[0]),(
long)1,(
long)1,
sizeof(
bool),
398 ECPGt_bool,&(is_json[1]),(
long)1,(
long)1,
sizeof(
bool),
400 ECPGt_bool,&(is_json[2]),(
long)1,(
long)1,
sizeof(
bool),
402 ECPGt_bool,&(is_json[3]),(
long)1,(
long)1,
sizeof(
bool),
404 ECPGt_bool,&(is_json[4]),(
long)1,(
long)1,
sizeof(
bool),
406 ECPGt_bool,&(is_json[5]),(
long)1,(
long)1,
sizeof(
bool),
408 ECPGt_bool,&(is_json[6]),(
long)1,(
long)1,
sizeof(
bool),
410 ECPGt_bool,&(is_json[7]),(
long)1,(
long)1,
sizeof(
bool),
412 #line 114 "sqljson.pgc"
415 #line 114 "sqljson.pgc"
417 for (
int i = 0;
i <
sizeof(is_json);
i++)
418 printf(
"Found is_json[%d]: %s\n",
i, is_json[
i] ?
"true" :
"false");
421 #line 118 "sqljson.pgc"
424 #line 118 "sqljson.pgc"
bool ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)