Skip to content

Commit 23f7bd7

Browse files
authored
parser: improve json_table column options (#564)
1 parent cb392d6 commit 23f7bd7

File tree

10 files changed

+1006
-467
lines changed

10 files changed

+1006
-467
lines changed

.github/workflows/rust.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,14 @@ jobs:
238238

239239
publish-npm:
240240
if: startsWith(github.ref, 'refs/tags/')
241-
needs: [build-linux-x64, build-linux-musl-x64, build-mac, build-windows]
241+
needs:
242+
[
243+
build-linux-x64,
244+
build-linux-musl-x64,
245+
build-linux-arm64,
246+
build-mac,
247+
build-windows,
248+
]
242249
runs-on: ubuntu-22.04
243250
steps:
244251
- uses: actions/checkout@v4
@@ -300,7 +307,8 @@ jobs:
300307
cache-to: type=gha,mode=max
301308

302309
deploy-playground:
303-
if: startsWith(github.ref, 'refs/tags/')
310+
needs: pre_job
311+
if: needs.pre_job.outputs.should_skip != 'true' || startsWith(github.ref, 'refs/tags/')
304312
runs-on: ubuntu-22.04
305313
steps:
306314
- name: Checkout
@@ -388,9 +396,6 @@ jobs:
388396
- name: Cache
389397
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # pin@v2
390398

391-
- name: Install ripgrep
392-
run: cargo install ripgrep
393-
394399
- name: Test
395400
run: ./s/test
396401

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# IntelliJ IDE users
88
.idea
9-
dist
9+
dist/
1010

1111
.DS_Store
1212
temp.sql

PLAN.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,22 @@ create function pg_catalog.jsonb_extract_path(
624624
as $$jsonb_extract_path$$
625625
```
626626

627+
#### Json path expressions
628+
629+
```sql
630+
select * from json_table(
631+
jsonb '[1,2,3]',
632+
'$[*] ? (@ < $x)'
633+
-- ^^ go to def jumps to the def in the passing clause
634+
passing 10 as x, 3 as y
635+
-- ^ find references
636+
-- ^ find references
637+
columns (a text format json path '$ ? (@ < $y)')
638+
-- references json_table arg ^
639+
-- also references passing clause ^^
640+
);
641+
```
642+
627643
### Autocomplete
628644

629645
- [datagrip postfix completion](https://blog.jetbrains.com/datagrip/2019/03/11/top-9-sql-features-of-datagrip-you-have-to-know/#postfix_completion)

crates/squawk_parser/src/generated/syntax_kind.rs

Lines changed: 11 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)