Node-RED node for local SQLite database read/write operations. Current stable version is 2.0.1, released as part of the node-red-nodes collection. The package wraps the better-sqlite3 library (v2+) or sqlite3 (v1) to provide SQL query execution with support for prepared statements, parameterized queries, batch execution, SQLite extensions, and configurable reconnect timeouts. Install via npm in the Node-RED user directory with --unsafe-perm flag. Version 2.x introduces a breaking change requiring native binary rebuild on some platforms. Allows SQL injection when using raw queries via msg.topic, but prepared statements mitigate this.
npm install node-red-node-sqliteVerified import paths — ran on the pinned version, not inferred.
Shows basic SQLite node usage: install, configure, inject query via msg.topic with parameters, and retrieve results.
Run `cd ~/.node-red/node_modules/sqlite3 && npm run rebuild` or similar depending on install location.
Use 'Prepared Statement' mode with msg.params and parameterized queries.
Ensure msg.params keys start with $, e.g., { $id: 1, $name: 'John' }Upgrade to v2.x and rebuild native dependencies.
Set `--unsafe-perm` flag during install; be patient.
Rebuild sqlite3 binary: `cd ~/.node-red/node_modules/sqlite3 && npm run rebuild`
Ensure msg.params keys match query parameters with $ prefix, e.g., { $id: 1 }Run `npm rebuild` in Node-RED user directory or specific module folder.
Reinstall with `npm install --unsafe-perm node-red-node-sqlite` ensuring build tools available.