@@ -367,6 +367,148 @@ select 'a IN (0,null, "null", xxx, "zzz", 2)'::jsquery;
367367 "a" IN (0, null, "null", "xxx", "zzz", 2)
368368(1 row)
369369
370+ select 'not < 1'::jsquery;
371+ jsquery
372+ -----------
373+ "not" < 1
374+ (1 row)
375+
376+ select 'not not < 1'::jsquery;
377+ jsquery
378+ -----------------
379+ NOT ("not" < 1)
380+ (1 row)
381+
382+ select 'not( not < 1)'::jsquery;
383+ jsquery
384+ -----------------
385+ NOT ("not" < 1)
386+ (1 row)
387+
388+ select 'not.x < 1'::jsquery;
389+ jsquery
390+ ---------------
391+ "not"."x" < 1
392+ (1 row)
393+
394+ select 'x.not < 1'::jsquery;
395+ jsquery
396+ ---------------
397+ "x"."not" < 1
398+ (1 row)
399+
400+ select 'is < 1'::jsquery;
401+ jsquery
402+ ----------
403+ "is" < 1
404+ (1 row)
405+
406+ select 'in < 1'::jsquery;
407+ jsquery
408+ ----------
409+ "in" < 1
410+ (1 row)
411+
412+ select 'not is < 1'::jsquery;
413+ ERROR: bad jsquery representation
414+ LINE 1: select 'not is < 1'::jsquery;
415+ ^
416+ DETAIL: syntax error, unexpected '<' at or near "<"
417+ select 'not in < 1'::jsquery;
418+ ERROR: bad jsquery representation
419+ LINE 1: select 'not in < 1'::jsquery;
420+ ^
421+ DETAIL: syntax error, unexpected '<', expecting '(' at or near "<"
422+ select 'in in (1,2)'::jsquery;
423+ jsquery
424+ ----------------
425+ "in" IN (1, 2)
426+ (1 row)
427+
428+ select 'is in (1,2)'::jsquery;
429+ jsquery
430+ ----------------
431+ "is" IN (1, 2)
432+ (1 row)
433+
434+ select 'not in (1,2)'::jsquery;
435+ jsquery
436+ -----------------
437+ "not" IN (1, 2)
438+ (1 row)
439+
440+ select 'in is numeric'::jsquery;
441+ jsquery
442+ -----------------
443+ "in" IS NUMERIC
444+ (1 row)
445+
446+ select 'is is numeric'::jsquery;
447+ jsquery
448+ -----------------
449+ "is" IS NUMERIC
450+ (1 row)
451+
452+ select 'not is numeric'::jsquery;
453+ jsquery
454+ ------------------
455+ "not" IS NUMERIC
456+ (1 row)
457+
458+ select 'not.in < 1'::jsquery;
459+ jsquery
460+ ----------------
461+ "not"."in" < 1
462+ (1 row)
463+
464+ select 'not.is < 1'::jsquery;
465+ jsquery
466+ ----------------
467+ "not"."is" < 1
468+ (1 row)
469+
470+ select 'not.not < 1'::jsquery;
471+ jsquery
472+ -----------------
473+ "not"."not" < 1
474+ (1 row)
475+
476+ select 'in.in < 1'::jsquery;
477+ jsquery
478+ ---------------
479+ "in"."in" < 1
480+ (1 row)
481+
482+ select 'in.is < 1'::jsquery;
483+ jsquery
484+ ---------------
485+ "in"."is" < 1
486+ (1 row)
487+
488+ select 'in.not < 1'::jsquery;
489+ jsquery
490+ ----------------
491+ "in"."not" < 1
492+ (1 row)
493+
494+ select 'is.in < 1'::jsquery;
495+ jsquery
496+ ---------------
497+ "is"."in" < 1
498+ (1 row)
499+
500+ select 'is.is < 1'::jsquery;
501+ jsquery
502+ ---------------
503+ "is"."is" < 1
504+ (1 row)
505+
506+ select 'is.not < 1'::jsquery;
507+ jsquery
508+ ----------------
509+ "is"."not" < 1
510+ (1 row)
511+
370512select '{"a": {"b": null}}'::jsonb @@ 'a.b = 1';
371513 ?column?
372514----------
@@ -989,9 +1131,9 @@ LINE 1: select 'a\r = x"\\abcd"'::jsquery AS err;
9891131DETAIL: syntax error, unexpected STRING_P, expecting $end at or near """
9901132--IS
9911133select 'as IS boolean OR as is ARRAY OR as is ObJect OR as is Numeric OR as is string'::jsquery;
992- jsquery
993- ------------------------------------------------------------------------------------------------
994- (((("as" IS BOOLEAN OR "as" IS ARRAY) OR "as" IS OBJECT) OR "as" IS NUMBER ) OR "as" IS STRING)
1134+ jsquery
1135+ -------------------------------------------------------------------------------------------------
1136+ (((("as" IS BOOLEAN OR "as" IS ARRAY) OR "as" IS OBJECT) OR "as" IS NUMERIC ) OR "as" IS STRING)
9951137(1 row)
9961138
9971139select '{"as": "xxx"}' @@ 'as IS string'::jsquery;
0 commit comments