ES6 Promise-based interface to the sqlite3 module. Version 1.2.2 is stable and unmaintained since 2020. It wraps every method of the node-sqlite3 synchronous callback API into a Promise-returning equivalent, supporting Database and Statement classes. Unlike alternatives like better-sqlite3 (synchronous) or sql.js (WebAssembly), it is a thin wrapper over the popular but callback-heavy node-sqlite3, adding no new features beyond promise conversion. Release cadence: last updated in 2020, likely maintenance mode. Key differentiator: minimal API, exactly matches sqlite3 method signatures.
npm install sqlite-asyncNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Opens an in-memory SQLite database, creates a table, inserts a row, and retrieves it using async/await.
Ensure the function passed to close() returns a promise: db.close(() => { return somePromise(); })Do not nest transaction calls. Use savepoints manually if needed.
Always pass a callback function to each(): db.each(sql, [], row => { ... })Use environment variable npm_config_build_from_source=true if prebuilt binaries fail.
npm install sqlite3
Wrap async operations in try/catch or add .catch() to the promise chain.
Ensure you use Database.open() and not a direct new Database() which is not supported.
Restructure code to use a single transaction or use SAVEPOINT.