Commit 217ed0a
committed
feat: add PGLite-based PostgreSQL analyzer using wazero
Add experimental support for PGLite, an embedded PostgreSQL that runs
in WebAssembly via wazero. This allows database-backed type analysis
without requiring a running PostgreSQL server.
Changes:
- Add 'pglite' experiment flag (SQLCEXPERIMENT=pglite)
- Add PGLite configuration in analyzer config (url, sha256)
- Create pglite analyzer package that uses wazero runtime
- Wire PGLite analyzer into compiler when experiment is enabled
To use PGLite analyzer, enable the experiment and configure it:
SQLCEXPERIMENT=pglite sqlc generate
sqlc.yaml:
sql:
- engine: postgresql
analyzer:
pglite:
url: "file://path/to/pglite.wasm"
sha256: "..."
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 74ecda5 commit 217ed0a
File tree
6 files changed
+968
-3
lines changed- internal
- compiler
- config
- engine/postgresql/pglite
- opts
6 files changed
+968
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
| |||
0 commit comments