You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A full [JSONata 2.x](https://jsonata.org) implementation in Go with SQLite integration, editor tooling, and query optimization.
3
+
Full [JSONata 2.x](https://jsonata.org) implementation in Go — with a loadable SQLite extension, streaming query optimizer, and 85KB WASM LSP.
4
4
5
-
## Fork Notice
6
-
7
-
Forked from [RecoLabs/gnata](https://github.com/RecoLabs/gnata), which provides a production-grade JSONata 2.x engine in pure Go. This project extends the core engine with a loadable SQLite extension, a CodeMirror 6 editor with TinyGo WASM LSP, and a query planner that decomposes JSONata into streaming SQL-friendly operations.
A loadable SQLite extension that brings JSONata expressions into SQL queries. Query, transform, and aggregate JSON data directly from SQLite.
37
-
38
30
```sql
39
31
.load ./gnata_jsonata sqlite3_jsonata_init
40
32
@@ -45,27 +37,43 @@ SELECT jsonata_query('$sum(amount)', data) FROM orders;
45
37
-- 4250
46
38
```
47
39
48
-
Key functions:
40
+
| Function | Description |
41
+
|----------|-------------|
42
+
|`jsonata(json, expr)`| Evaluate expression against JSON |
43
+
|`jsonata_query(expr, json)`| Expression-first argument order |
44
+
|`jsonata_each(expr, json)`| Expand results into rows (table-valued) |
45
+
|`jsonata_set(json, path, val)`| Set a value at a path |
46
+
|`jsonata_delete(json, path)`| Delete a value at a path |
47
+
48
+
See [sqlite/README.md](sqlite/README.md) for full docs. Query optimization details in [sqlite/OPTIMIZATION.md](sqlite/OPTIMIZATION.md).
49
49
50
-
-`jsonata(json, expr)` -- evaluate a JSONata expression against a JSON value
51
-
-`jsonata_query(expr, json)` -- same operation, expression-first argument order
52
-
-`jsonata_each(expr, json)` -- expand results into rows (table-valued function)
53
-
-`jsonata_set(json, path, value)` -- set a value at a path
54
-
-`jsonata_delete(json, path)` -- delete a value at a path
50
+
## Benchmarks
55
51
56
-
The built-in query planner decomposes JSONata expressions into streaming SQL-friendly operations for better performance on large datasets. See [sqlite/OPTIMIZATION.md](sqlite/OPTIMIZATION.md) and [sqlite/BLOGPOST.md](sqlite/BLOGPOST.md) for details.
52
+

57
53
58
-
See [sqlite/README.md](sqlite/README.md) for full documentation.
54
+

59
55
60
-
## Editor / LSP
56
+
<details>
57
+
<summary>Raw numbers (Apple M1)</summary>
61
58
62
-
CodeMirror 6 language support and LSP server for JSONata, powered by gnata's parser.
|[`editor/`](editor/README.md)| CodeMirror 6 language support + TinyGo WASM LSP |
69
77
70
78
## Building
71
79
@@ -85,8 +93,16 @@ cd editor/codemirror && npm install && npm run build
85
93
86
94
## Playground
87
95
88
-
Open `playground.html` for interactive testing of JSONata expressions and the SQLite extension in the browser.
96
+
Open `playground.html` or visit the [live playground](https://rbbydotdev.github.io/gnata-sqlite/) for interactive testing of JSONata expressions and the SQLite extension.
97
+
98
+
## Contributing
99
+
100
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
101
+
102
+
## Fork Notice
103
+
104
+
Forked from [RecoLabs/gnata](https://github.com/RecoLabs/gnata), which provides a production-grade JSONata 2.x engine in pure Go. This project extends the core engine with a SQLite extension, editor tooling, and query optimizer.
89
105
90
106
## License
91
107
92
-
MIT. Based on [RecoLabs/gnata](https://github.com/RecoLabs/gnata).
Copy file name to clipboardExpand all lines: editor/codemirror/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# @gnata/codemirror
1
+
# @gnata-sqlite/codemirror
2
2
3
3
CodeMirror 6 language support for [JSONata](https://jsonata.org) expressions — syntax highlighting, error diagnostics, autocomplete, and hover documentation, powered by a 85KB WASM module.
4
4
@@ -12,7 +12,7 @@ CodeMirror 6 language support for [JSONata](https://jsonata.org) expressions —
12
12
## Install
13
13
14
14
```bash
15
-
npm install @gnata/codemirror
15
+
npm install @gnata-sqlite/codemirror
16
16
```
17
17
18
18
You also need the WASM files served from your app:
@@ -23,7 +23,7 @@ You also need the WASM files served from your app:
0 commit comments