Skip to content

Commit 7ac0ce5

Browse files
committed
improve tests
1 parent 0a6be83 commit 7ac0ce5

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

expected/jsquery.out

+12
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,18 @@ select '{"a":{"aa":1}, "b":{"aa":true, "bb":2}}' @@ '%:.aa is numeric'::jsquery;
14371437
f
14381438
(1 row)
14391439

1440+
select '{"a":{"aa":1}, "b":{"aa":1, "bb":2}, "aa":16}' @@ '*: (not $ is object or $.aa is numeric)'::jsquery;
1441+
?column?
1442+
----------
1443+
t
1444+
(1 row)
1445+
1446+
select '{"a":{"aa":1}, "b":{"aa":1, "bb":2}}' @@ '*: (not $ is object or $.aa is numeric or % is object)'::jsquery;
1447+
?column?
1448+
----------
1449+
t
1450+
(1 row)
1451+
14401452
--extract entries for index scan
14411453
SELECT gin_debug_query_path_value('NOT NOT NOT x(y(NOT (a=1) and NOT (b=2)) OR NOT NOT (c=3)) and z = 5');
14421454
gin_debug_query_path_value

sql/jsquery.sql

+2
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ select '{"a":{"aa":1, "ab":2}, "b":[5,6, {"c":"x"}]}' @@ '*: ($ is object OR $ i
288288
select '{"a":{"aa":1, "ab":2}, "b":[5,6, {"c":null}]}' @@ '*: ($ is object OR $ is array OR $ is numeric)'::jsquery;
289289
select '{"a":{"aa":1}, "b":{"aa":1, "bb":2}}' @@ '%:.aa is numeric'::jsquery;
290290
select '{"a":{"aa":1}, "b":{"aa":true, "bb":2}}' @@ '%:.aa is numeric'::jsquery;
291+
select '{"a":{"aa":1}, "b":{"aa":1, "bb":2}, "aa":16}' @@ '*: (not $ is object or $.aa is numeric)'::jsquery;
292+
select '{"a":{"aa":1}, "b":{"aa":1, "bb":2}}' @@ '*: (not $ is object or $.aa is numeric or % is object)'::jsquery;
291293

292294
--extract entries for index scan
293295

0 commit comments

Comments
 (0)