Skip to content

Commit 0a6be83

Browse files
committed
improve tests
1 parent 2eca4ee commit 0a6be83

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Diff for: expected/jsquery.out

+12
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,18 @@ select '{"a":{"aa":1, "ab":2}, "b":[5,6, {"c":null}]}' @@ '*: ($ is object OR $
14251425
f
14261426
(1 row)
14271427

1428+
select '{"a":{"aa":1}, "b":{"aa":1, "bb":2}}' @@ '%:.aa is numeric'::jsquery;
1429+
?column?
1430+
----------
1431+
t
1432+
(1 row)
1433+
1434+
select '{"a":{"aa":1}, "b":{"aa":true, "bb":2}}' @@ '%:.aa is numeric'::jsquery;
1435+
?column?
1436+
----------
1437+
f
1438+
(1 row)
1439+
14281440
--extract entries for index scan
14291441
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');
14301442
gin_debug_query_path_value

Diff for: sql/jsquery.sql

+2
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ select '{"a":{"aa":1, "ab":2}, "b":[5,6]}' @@ '*: ($ is object OR $ is array OR
286286
select '{"a":{"aa":1, "ab":2}, "b":[5,6, {"c":8}]}' @@ '*: ($ is object OR $ is array OR $ is numeric)'::jsquery;
287287
select '{"a":{"aa":1, "ab":2}, "b":[5,6, {"c":"x"}]}' @@ '*: ($ is object OR $ is array OR $ is numeric)'::jsquery;
288288
select '{"a":{"aa":1, "ab":2}, "b":[5,6, {"c":null}]}' @@ '*: ($ is object OR $ is array OR $ is numeric)'::jsquery;
289+
select '{"a":{"aa":1}, "b":{"aa":1, "bb":2}}' @@ '%:.aa is numeric'::jsquery;
290+
select '{"a":{"aa":1}, "b":{"aa":true, "bb":2}}' @@ '%:.aa is numeric'::jsquery;
289291

290292
--extract entries for index scan
291293

0 commit comments

Comments
 (0)