better-sqlite3
"better-sqlite3": "7.5.0"
const db = require('better-sqlite3')('foobar.db', options);
const row = db.prepare('SELECT * FROM users WHERE id = ?').get(userId);
console.log(row.firstName, row.lastName, row.email);In ES6 module notation:
import Database from 'better-sqlite3';
const db = new Database('foobar.db', options)
Comments