Skip to content

@JoshuaWise JoshuaWise released this Jan 22, 2019 · 1 commit to master since this release

  • Added support for online backups via the db.backup() method.
  • Added verbose mode, which allows you to log all SQL executed by a database connection.
  • You can now execute read-only SQL while retrieving data via stmt.iterate().
    • Previously, you would get a "database connection is busy" error.
    • This allows you to perform nested calls to stmt.iterate().
  • Removed the SQLITE_OMIT_TRACE compilation option.
  • Enabled the SQLITE_TRACE_SIZE_LIMIT=32 compilation option.
Assets 2
Jan 11, 2019
5.3.0
Dec 17, 2018
5.2.1

@JoshuaWise JoshuaWise released this Dec 15, 2018 · 72 commits to master since this release

Assets 2
Oct 9, 2018

@JoshuaWise JoshuaWise released this Oct 9, 2018 · 108 commits to master since this release

This major version provides powerful new features, bug fixes, improved performance, and much much more.

Breaking changes

  • Dropped support for Node.js versions < 8.
  • Renamed info.lastInsertROWID to info.lastInsertRowid (docs).
  • Renamed stmt.returnsData to stmt.reader (docs).
  • The db.pragma() method now accepts { simple: true } instead of a true boolean (docs).
  • Redesigned the db.transaction() method:
    • Transaction objects have been removed.
    • The db.transaction() method now takes a function and returns a function (a wrapper).
    • The returned function will automatically run inside a transaction.
    • Nested transactions (savepoints) are supported.
    • Read the full documentation here.
  • Removed the db.register() method, added the db.function() and db.aggregate() methods:
    • The db.function() method is used to register regular user-defined functions.
    • The db.aggregate() method is used to register user-defined aggregate functions.
    • The APIs for both methods have been changed from the old db.register() method. Read the new documentation here and here, respectively.
    • The db.aggregate() method can also register window functions.
  • Enabled the SQLITE_ENABLE_FTS3_PARENTHESIS compilation option (more info).
  • When opening a database, the memory and readonly options are now mutually exclusive (docs).
  • Moved all documentation from the wiki to the repository itself (here).
    • Documentation for the (deprecated) version v4.x.x can be found here.

Non-breaking new features

  • SQLite3 was upgraded to version 3.25.2.
  • Enabled the following compilation options:
  • Users can now compile better-sqlite3 against their own customized version of SQLite3:
    • Read the instructions here.
    • This also enables support for sqleet, SQLCipher, and other drop-in replacements for SQLite3.
  • If the process exits gracefully (i.e., the event loop has no more work to do), all open databases will automatically be closed. This does not happen for forced exits (i.e., process.exit(), SIGINT, etc.).
  • Added the timeout option when opening a database (docs).
  • Added support for anonymous in-memory databases, using the ":memory:" filename (more info).
  • Added the stmt.expand() method, which namespaces result columns by table name (docs).

Bug fixes and other minor improvements

  • Fixed a bug that caused v8::ToLocalChecked Empty.
  • Fixed a bug that caused db.inTransaction to be true when the database was closed.
  • Fixed a bug that prevented users from including trailing whitespace in prepared statements.
  • Fixed many v8 deprecation warnings.
  • Fixed many installation-related bugs.
  • Improved performance of user-defined aggregate functions by ~15%.
  • Added many other (minor) performance optimizations.
Assets 2
Oct 9, 2018

@JoshuaWise JoshuaWise released this Oct 9, 2018 · 289 commits to master since this release

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.

Assets 2
Jun 13, 2018
4.1.4
Jun 13, 2018
4.1.3
You can’t perform that action at this time.