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
-[Query serialization](https://github.com/gms1/node-sqlite3/wiki/Control-Flow) API
24
-
-[Extension support](https://github.com/gms1/node-sqlite3/wiki/API#databaseloadextensionpath-callback), including bundled support for the [json1 extension](https://www.sqlite.org/json1.html)
22
+
- Extensive debugging support via [verbose mode](docs/API.md#verbose-mode)
23
+
-[Query serialization](docs/API.md#databaseserialize) API
24
+
-[Extension support](docs/API.md#databaseloadextension), including bundled support for the [json1 extension](https://www.sqlite.org/json1.html)
25
25
- Big test suite
26
-
- Written in modern C++ and tested for memory leaks
26
+
- Written in modern C++
27
27
- Bundles SQLite v3.53.0, or you can build using a local SQLite
`@homeofthings/sqlite3` uses [Node-API](https://nodejs.org/api/n-api.html) so prebuilt binaries do not need to be built for specific Node versions. Prebuilt binaries are available for Node-API v3 and v6. Check the [Node-API version matrix](https://nodejs.org/api/n-api.html#node-api-version-matrix) to ensure your Node version supports one of these. Requires Node.js v20.17.0 or later.
42
+
`@homeofthings/sqlite3` uses [Node-API](https://nodejs.org/api/n-api.html) so prebuilt binaries do not need to be built for specific Node versions. Prebuilt binaries are built as NAPI-version-agnostic (`@homeofthings+sqlite3.*.node`) using the `--napi` flag, and work on any Node.js version that supports the NAPI version used at compile time. Requires Node.js v20.17.0 or later.
44
43
45
-
The module uses [`prebuild-install`](https://github.com/prebuild/prebuild-install) to download the prebuilt binary for your platform, if it exists. These binaries are hosted on GitHub Releases. The following targets are currently provided:
44
+
Prebuilt binaries are bundled inside the npm package using [`prebuildify`](https://github.com/prebuild/prebuildify) and loaded at runtime by [`node-gyp-build`](https://github.com/prebuild/node-gyp-build). No separate download step is needed — `npm install` just works. The following targets are currently provided:
46
45
47
46
*`darwin-arm64`
48
47
*`darwin-x64`
49
-
*`linux-arm64`
50
-
*`linux-x64`
51
-
*`linuxmusl-arm64`
52
-
*`linuxmusl-x64`
48
+
*`linux-arm64` (glibc)
49
+
*`linux-x64` (glibc)
50
+
*`linux-arm64` (musl)
51
+
*`linux-x64` (musl)
53
52
*`win32-x64`
54
53
55
-
Unfortunately, [prebuild](https://github.com/prebuild/prebuild/issues/174) cannot differentiate between `armv6` and `armv7`, and instead uses `arm` as the `{arch}`. Until that is fixed, you will still need to install `sqlite3` from [source](#source-install).
56
-
57
54
Support for other platforms and architectures may be added in the future if CI supports building on them.
58
55
59
-
If your environment isn't supported, it'll use `node-gyp` to build SQLite, but you will need to install a C++ compiler and linker.
56
+
If your platform isn't supported, `node-gyp-build` automatically falls back to building from source using `node-gyp`.
60
57
61
58
### Other ways to install
62
59
@@ -136,26 +133,29 @@ db.close();
136
133
137
134
## Source install
138
135
139
-
To skip searching for pre-compiled binaries, and force a build from source, use
If building against an external sqlite3 make sure to have the development headers available. Mac OS X ships with these by default. If you don't have them installed, install the `-dev` package with your package manager, e.g. `apt-get install libsqlite3-dev` for Debian/Ubuntu. Make sure that you have at least `libsqlite3` >= 3.6.
146
144
147
145
Note, if building against homebrew-installed sqlite on OS X you can do:
The default sqlite file header is "SQLite format 3". You can specify a different magic, though this will make standard tools and libraries unable to work with your files.
Running `sqlite3` through [electron-rebuild](https://github.com/electron/electron-rebuild) does not preserve the SQLCipher extension, so some additional flags are needed to make this build Electron compatible. Your `npm install @homeofthings/sqlite3 --build-from-source` command needs these additional flags (be sure to replace the target version with the current Electron version you are working with):
239
+
Running `sqlite3` through [electron-rebuild](https://github.com/electron/electron-rebuild) does not preserve the SQLCipher extension, so some additional flags are needed to make this build Electron compatible. So your command needs these additional flags (be sure to replace the target version with the current Electron version you are working with):
0 commit comments