NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3459 most downloaded on npm
The fastest and simplest library for SQLite in Node.js.
Last release 1 months ago
05 Aug 2026
Ships fairly regularly
a new release about every 6 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
91 versions withdrawn
withdrawn after publishing
10 years old
159 releases · first in 2016
Explicitly support node 19 by @0rnella in https://github.com/WiseLibs/better-sqlite3/pull/964
pr_body text of update-sqlite workflow by @m4heshd in https://github.com/WiseLibs/better-sqlite3/pull/946Full Changelog: https://github.com/WiseLibs/better-sqlite3/compare/v8.1.0...v8.2.0
Add support for electron v23 prebuilds by @m4heshd in https://github.com/WiseLibs/better-sqlite3/pull/951
v23 prebuilds by @m4heshd in https://github.com/WiseLibs/better-sqlite3/pull/951Full Changelog: https://github.com/WiseLibs/better-sqlite3/compare/v8.0.1...v8.1.0
One column per quarter.
Add support for electron v21 prebuilds by @m4heshd in https://github.com/WiseLibs/better-sqlite3/pull/909
v21 prebuilds by @m4heshd in https://github.com/WiseLibs/better-sqlite3/pull/909v22 prebuilds by @m4heshd in https://github.com/WiseLibs/better-sqlite3/pull/915Full Changelog: https://github.com/WiseLibs/better-sqlite3/compare/v8.0.0...v8.0.1
Dropped support for Node.js versions 10.x and 12.x.
10.x and 12.x.3.40.0.Full Changelog: https://github.com/WiseLibs/better-sqlite3/compare/v7.6.2...v8.0.0
Update prebuild dependency to v11.0.4 by @m4heshd in https://github.com/WiseLibs/better-sqlite3/pull/845
prebuild dependency to v11.0.4 by @m4heshd in https://github.com/WiseLibs/better-sqlite3/pull/845v19 prebuilds by @m4heshd in https://github.com/WiseLibs/better-sqlite3/pull/834Full Changelog: https://github.com/WiseLibs/better-sqlite3/compare/v7.6.1...v7.6.2
Update SQLite to version 3.39.1 by @JoshuaWise in https://github.com/WiseLibs/better-sqlite3/pull/841
Full Changelog: https://github.com/WiseLibs/better-sqlite3/compare/v7.6.0...v7.6.1
Update troubleshooting.md by @thonkinator in https://github.com/WiseLibs/better-sqlite3/pull/752
Full Changelog: https://github.com/WiseLibs/better-sqlite3/compare/v7.5.3...v7.6.0
Full Changelog: https://github.com/WiseLibs/better-sqlite3/compare/v7.5.2...v7.5.3
Full Changelog: https://github.com/WiseLibs/better-sqlite3/compare/v7.5.2...v7.5.3
Add support for Node v18 prebuilds by @m4heshd in https://github.com/JoshuaWise/better-sqlite3/pull/800
v18 prebuilds by @m4heshd in https://github.com/JoshuaWise/better-sqlite3/pull/800Full Changelog: https://github.com/JoshuaWise/better-sqlite3/compare/v7.5.1...v7.5.2
Upgraded to SQLite version 3.38.2 (see commit and SQLite's release notes)
v17 prebuilds by @m4heshd in https://github.com/JoshuaWise/better-sqlite3/pull/757armv7 and arm64 and other improvements by @m4heshd in https://github.com/JoshuaWise/better-sqlite3/pull/758Full Changelog: https://github.com/JoshuaWise/better-sqlite3/compare/v7.5.0...v7.5.1
Upgraded SQLite to version `3.37.2`
3.37.2.busy property to prepared StatementsnativeBinding option to the Database constructorcode property of SqliteError to be enumerableSqliteError to the API documentationtar dependencybetter-sqlite3 (by using a files list in package.json)Upgraded to SQLite version 3.37.0
3.37.0Full Changelog: https://github.com/JoshuaWise/better-sqlite3/compare/v7.4.5...v7.4.6
Added electron v16 prebuild support by @m4heshd in https://github.com/JoshuaWise/better-sqlite3/pull/726
v16 prebuild support by @m4heshd in https://github.com/JoshuaWise/better-sqlite3/pull/726prebuild-install to v7.0.0 by @m4heshd in https://github.com/JoshuaWise/better-sqlite3/pull/724Full Changelog: https://github.com/JoshuaWise/better-sqlite3/compare/v7.4.4...v7.4.5
~added prebuilds for Alpine containers~ (looks like this failed)
Fixed https://github.com/JoshuaWise/better-sqlite3/issues/651
Fixed https://github.com/JoshuaWise/better-sqlite3/issues/651
Upgraded SQLite to version 3.36.0
3.36.0SQLITE_ENABLE_MATH_FUNCTIONS compile-time optionAdded prebuilt binaries for Node v16
Added the `db.table()` method, which allows users to register virtual tables.
db.table() method, which allows users to register virtual tables.Nothing published for this version
Added the `db.serialize()` method.
db.serialize() method.db.serialize() can be opened as in-memory databases by passing them to new Database(buffer).stmt.readonly property.directOnly option to user-defined functions and aggregates.added support for the `RETURNING` clause
Fixed subclassing (e.g., class MyClass extends Database {})
class MyClass extends Database {})- Fixes for Jest environments - Updated SQLite to v3.35.2
Nothing published for this version
Nothing published for this version
Updated SQLite to version 3.32.0.
Updated SQLite to version 3.32.0.
Nothing published for this version
Dropped support for Node.js versions < 10
Integer library with native BigIntsdb.checkpoint() method in favor of db.pragma('wal_checkpoint(RESTART)')":memory:" filename conventionFATAL ERROR: v8::ToLocalChecked Empty MaybeLocalFATAL ERROR: v8::Object::GetAlignedPointerFromInternalField()Error: Cannot find module '...\node_modules\integer\nodedb.loadExtension() which allows users to specify the entry point of the extensionSQLITE_DBCONFIG_DEFENSIVE which allows users to corrupt their database file and execute undefined behaviorNothing published for this version
Enabled `SQLITE_LIKE_DOESNT_MATCH_BLOBS`.
SQLITE_LIKE_DOESNT_MATCH_BLOBS.SQLITE_DQS=0.prebuild whenever a new release tag is made in github, via a travis CI workflow. As you can see in the travis config file, prebuild currently builds binaries for Node 8, 10, and 12, and Electron 2, 3, 4, 5, 6, and 7. Non-LTS node versions are not supported, but compiling better-sqlite3 from source should still work fine for those versions, as it always had. Prebuilt binaries are only made for Linux and Mac OSX, not Windows (but again, building from source should work fine on Windows too).Nothing published for this version
Nothing published for this version
Nothing published for this version
Added support for online backups via the db.backup() method.
SQLITE_OMIT_TRACE compilation option.SQLITE_TRACE_SIZE_LIMIT=32 compilation option.Nothing published for this version
Nothing published for this version
Updated SQLite to version 3.26.0.
Statement#raw() and Statement#columns() methods.SQLITE_DBCONFIG_DEFENSIVE .Nothing published for this version
Documentation for the (deprecated) version v4.x.x can be found here.
This major version provides powerful new features, bug fixes, improved performance, and much much more.
info.lastInsertROWID to info.lastInsertRowid (docs).stmt.returnsData to stmt.reader (docs).db.pragma() method now accepts { simple: true } instead of a true boolean (docs).db.transaction() method:
db.transaction() method now takes a function and returns a function (a wrapper).db.register() method, added the db.function() and db.aggregate() methods:
db.function() method is used to register regular user-defined functions.db.aggregate() method is used to register user-defined aggregate functions.db.register() method. Read the new documentation here and here, respectively.db.aggregate() method can also register window functions.SQLITE_ENABLE_FTS3_PARENTHESIS compilation option (more info).memory and readonly options are now mutually exclusive (docs).better-sqlite3 against their own customized version of SQLite3:
process.exit(), SIGINT, etc.).timeout option when opening a database (docs).":memory:" filename (more info).stmt.expand() method, which namespaces result columns by table name (docs).v8::ToLocalChecked Empty.db.inTransaction to be true when the database was closed.This is (probably) the last release of v4.x.x. Any documentation needed for this version can be found here. If possible, users should upgrade to versi
This is (probably) the last release of v4.x.x. Any documentation needed for this version can be found here. If possible, users should upgrade to version 5.0.0.
Nothing published for this version
Nothing published for this version
The build system was completely overhauled, hopefully fixing many installation bugs
A bug was fixed that was making it difficult for many Windows users to install the package.
A bug was fixed that was making it difficult for many Windows users to install the package.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Replaced the Statement#each() method with the new (and much more powerful) `Statement#iterate()` method.
Statement#each() method with the new (and much more powerful) Statement#iterate() method.Nothing published for this version
SQLite3 extensions are now supported. See the docs to learn how to use them.
SQLite3 extensions are now supported. See the docs to learn how to use them.
The database constructor now supports the `fileMustExist` option.
The database constructor now supports the fileMustExist option.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Added the db.inTransaction getter, allowing you to check if the database connection is currently in an open transaction.
Added the db.inTransaction getter, allowing you to check if the database connection is currently in an open transaction.
The bundled sqlite3 engine has been upgraded to version 3.19.3.
The bundled sqlite3 engine has been upgraded to version 3.19.3.
This major version provides some powerful new features, introduces a better API for some functions, and comes with many small performance enhancements
This major version provides some powerful new features, introduces a better API for some functions, and comes with many small performance enhancements.
Database#pragma() has been reworked to return proper result types (instead of just strings), and now works properly with readonly mode.Database#checkpoint() has been completely reworked. It now accepts different arguments and has a different return value. By default, it now checkpoints all attached databases instead of just the main database. To learn how to use it, click here.Database.Int64 class has been replaced by Database.Integer which is a reference to the self-contained integer package. Database.Integer has a very different API from the old Database.Int64, and provides many powerful features and utilities. Read about it here.new Database(options.readonly) or statement.pluck(newState)) must be boolean if provided. Previously, they used the truthiness of whatever was provided, but now the provided value must either be true, false, or omitted. An error will be thrown if a non-boolean value is provided.SqliteError, which is a subclass of Error, and has a code property that corresponds to a result code.
if (err.code === 'SQLITE_CONSTRAINT_UNIQUE')SqliteError class is available at Database.SqliteErrorDatabase#register() now accepts generator functions, which registers a custom aggregate SQL function. To learn how to use them, read here.nan package dependency has been removed, slightly improving performance.Statement#all(), an error is thrown instead of corrupting the results returned from the database (this is the maximum array.length in nodejs).$foo, :foo, @foo) when creating a statement or transaction with named parameters. Previously this would result in errors being thrown.Statement#bind() and Transaction#bind() methods can now be used even if the query was previously executed.The installation process has been completely rewritten, so I expect there to be installation issues when using Windows and/or Electron. If an issue like this comes up, please open an issue and I'll fix it as soon as possible.
fa3624e..0985983 improved performance of binding named parameters 0215d67, 03713e2 improved error messages when binding parameters 77ea5b1, f700521, d
fa3624e..0985983 improved performance of binding named parameters 0215d67, 03713e2 improved error messages when binding parameters 77ea5b1, f700521, d898405, 1d4c786 improved general performance
Nothing published for this version
85612bf Minor performance optimization for Statement#each() c7b5d38 Significant performance optimization for Statement#all()
85612bf Minor performance optimization for Statement#each()
c7b5d38 Significant performance optimization for Statement#all()
Your coding agent can read these notes before it upgrades. Set up the MCP server →