The node-sqlite3 module wrapped with Q promises.
npm install q-sqlite3The node-sqlite3 module wrapped with Q promises.
npm install q-sqlite3These all run as promises. If the normal API would not call the callback with
data, then the promise resolves to the database.
The only new method is createDatabase, which serves as a promise-wrapped version of the Database constructor; if successful, the promise resolves to the database instance. Otherwise the promise is rejected with the error sent as in node-sqlite3.
``javascript
var QSQL = require('q-sqlite3');
var DB = null;
QSQL.createDatabase(':memory:').done(function(db) {
DB = db;
});
DB.run('INSERT INTO tbl (name) VALUES (?)', "foo").then(function(statement) {
// do stuff with statement here
});
`
or Statement object.
* v0.1.1 - Implement the basics of Statements.
* v0.1.2 - Extend Statement` methods.