Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f321a73

Browse filesBrowse files
committed
improve tests
1 parent 35f946c commit f321a73
Copy full SHA for f321a73

File tree

2 files changed

+29
-0
lines changed
Filter options

2 files changed

+29
-0
lines changed

‎expected/jsquery.out

Copy file name to clipboardExpand all lines: expected/jsquery.out
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,30 @@ select '[1,2,3]'::jsonb @@ '#($ = 2)';
793793
t
794794
(1 row)
795795

796+
select '[3,4]'::jsonb @@ '#($ > 2 & $ < 5)';
797+
?column?
798+
----------
799+
t
800+
(1 row)
801+
802+
select '[3,4]'::jsonb @@ '# > 2 & # < 5';
803+
?column?
804+
----------
805+
t
806+
(1 row)
807+
808+
select '[1,6]'::jsonb @@ '#($ > 2 & $ < 5)';
809+
?column?
810+
----------
811+
f
812+
(1 row)
813+
814+
select '[1,6]'::jsonb @@ '# > 2 & # < 5';
815+
?column?
816+
----------
817+
t
818+
(1 row)
819+
796820
select '{"a": {"b": 3, "c": "hey"}, "x": [5,6]}'::jsonb @@ '%.b=3';
797821
?column?
798822
----------

‎sql/jsquery.sql

Copy file name to clipboardExpand all lines: sql/jsquery.sql
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ select '[1,2,3]'::jsonb @@ '# = 2';
160160
select '[1,2,3]'::jsonb @@ '#.$ = 2';
161161
select '[1,2,3]'::jsonb @@ '#($ = 2)';
162162

163+
select '[3,4]'::jsonb @@ '#($ > 2 & $ < 5)';
164+
select '[3,4]'::jsonb @@ '# > 2 & # < 5';
165+
select '[1,6]'::jsonb @@ '#($ > 2 & $ < 5)';
166+
select '[1,6]'::jsonb @@ '# > 2 & # < 5';
167+
163168
select '{"a": {"b": 3, "c": "hey"}, "x": [5,6]}'::jsonb @@ '%.b=3';
164169
select '{"a": {"b": 3, "c": "hey"}, "x": [5,6]}'::jsonb @@ 'a.%=3';
165170
select '{"a": {"b": 3, "c": "hey"}, "x": [5,6]}'::jsonb @@ '%.%="hey"';

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.