
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
sqlite3-ext
Advanced tools
Asynchronous, non-blocking SQLite3 bindings for Node.js.
Extended version
The sqlite3 module works with Node.js v4.x, v6.x, v8.x, and v10.x.
The sqlite3 module also works with node-webkit if node-webkit contains a supported version of Node.js engine. (See below.)
SQLite's SQLCipher extension is also supported. (See below.)
Note: the module must be installed before use.
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database(':memory:');
db.serialize(function() {
db.run("CREATE TABLE lorem (info TEXT)");
var stmt = db.prepare("INSERT INTO lorem VALUES (?)");
for (var i = 0; i < 10; i++) {
stmt.run("Ipsum " + i);
}
stmt.finalize();
db.each("SELECT rowid AS id, info FROM lorem", function(err, row) {
console.log(row.id + ": " + row.info);
});
});
db.close();
First implementation by Whitney Young
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database(':memory:', function() {
db.registerFunction('A_PLUS_B', function(a, b) {
return a+b;
});
db.all('SELECT A_PLUS_B(1, 2) AS val', function(err, rows) {
console.log(row.id + ": " + row.info); //Prints [{val: 3}]
});
db.close();
});
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database(':memory:', function() {
let tempStr = '';
db.registerAggregateFunction('CUSTOM_AGGREGATE', function(value) {
if(!value){
return tempStr;
}
tempStr+= value;
});
db.all('SELECT CUSTOM_AGGREGATE(id) AS val', function(err, rows) {
console.log(row.id + ": " + row.info); //Prints [{val: '123456'}] if table has 6 rows with id field
});
db.close();
});
sqlite_create_functionSee the API documentation in the wiki.
You can use npm to download and install:
master branch: npm install https://github.com/lailune/node-sqlite3/tarball/masterIt is possible to use the installed package in node-webkit instead of the vanilla Node.js.
mocha is required to run unit tests.
In sqlite3's directory (where its package.json resides) run the following:
npm install mocha
npm test
Originally developed by MapBox
FAQs
Asynchronous, non-blocking SQLite3 bindings with user functions support
We found that sqlite3-ext demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.