latticesql 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +291 -180
- package/dist/index.cjs +581 -469
- package/dist/index.js +305 -194
- package/docs/configuration.md +27 -0
- package/package.json +1 -1
package/docs/configuration.md
CHANGED
|
@@ -17,6 +17,7 @@ Complete reference for `lattice.config.yml` — the YAML schema config format in
|
|
|
17
17
|
- [Multiple entities](#multiple-entities)
|
|
18
18
|
- [Programmatic config API](#programmatic-config-api)
|
|
19
19
|
- [Complete example](#complete-example)
|
|
20
|
+
- [Troubleshooting](#troubleshooting)
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
|
@@ -451,3 +452,29 @@ without `fts` are still searchable via the LIKE fallback. Indexes are created
|
|
|
451
452
|
**only** for opt-in tables, so a library consumer with no `fts` config incurs
|
|
452
453
|
no index and no write-path overhead. See `docs/api-reference.md` →
|
|
453
454
|
_Full-text search_ for the `fullTextSearch` API.
|
|
455
|
+
|
|
456
|
+
## Troubleshooting
|
|
457
|
+
|
|
458
|
+
### The local SQLite engine auto-rebuilds when the Node runtime changes
|
|
459
|
+
|
|
460
|
+
The local SQLite backend is powered by the `better-sqlite3` native module,
|
|
461
|
+
whose compiled binary is pinned to the Node ABI present when it was installed.
|
|
462
|
+
If your Node version later changes — a package-manager upgrade, a version
|
|
463
|
+
switch via a Node manager, or simply a different Node in CI than on your
|
|
464
|
+
machine — that prebuilt binary no longer matches the runtime.
|
|
465
|
+
|
|
466
|
+
Lattice handles this transparently: the SQLite engine is loaded the first time
|
|
467
|
+
a workspace opens, and when it detects an ABI mismatch it **automatically
|
|
468
|
+
rebuilds `better-sqlite3` for the current runtime** in-process, then continues.
|
|
469
|
+
You'll see a single line on stderr while the rebuild runs (so a slow rebuild
|
|
470
|
+
isn't a silent hang); on success there's nothing else to do.
|
|
471
|
+
|
|
472
|
+
An error is surfaced only as a last resort — when the module isn't installed at
|
|
473
|
+
all, or the automatic rebuild can't complete (no build toolchain, no network to
|
|
474
|
+
fetch a prebuild, etc.). In that case the message tells you exactly what to run:
|
|
475
|
+
`npm rebuild better-sqlite3` (or a clean reinstall), then retry.
|
|
476
|
+
|
|
477
|
+
To disable the automatic rebuild (e.g. in a sandboxed or read-only environment
|
|
478
|
+
where you'd rather manage the native module yourself), set the environment
|
|
479
|
+
variable `LATTICE_SQLITE_NO_AUTOREBUILD=1`. With it set, an ABI mismatch raises
|
|
480
|
+
the same actionable error instead of attempting a rebuild.
|
package/package.json
CHANGED