domo-arigato-mysql
v0.0.4
Published
Promise based mysql wrapper for node.JS apps.
Downloads
1
Readme
domo-arigato-mysql
Promise based mysql wrapper for node.JS apps.
Sample Usage:
var database = require('domo-arigato-mysql')({
host: 'localhost',
port: 3306,
user: 'myUser',
password: 'myPassword',
database: 'myDatabaseName'
});
var query = `select 'test' from dual`;
database.startTransaction()
.then(function() {
return database.query(query, params);
})
.then(function (rows) {
console.dir(rows);
return database.commit();
})
.then(function() {
return database.close();
})
.catch(function(err) {
return database.rollback();
});