Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit0a6be83

Browse files
committed
improve tests
1 parent2eca4ee commit0a6be83

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

‎expected/jsquery.out

Lines changed: 12 additions & 0 deletions
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

‎sql/jsquery.sql

Lines changed: 2 additions & 0 deletions
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)

[8]ページ先頭

©2009-2025 Movatter.jp