deprecated - [co-mysql] node-mysql wrapper for co or koa
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
Readme.md
index.js
package.json

Readme.md

Please use modules thunkify or promisify directly.

NPM version Build status Test coverage License Dependency status

usage

var wrapper = require('co-mysql'),
  mysql = require('mysql'),
  co = require('co');

var pool = mysql.createPool(options),
  p = wrapper(pool);

// promise
p.query('SELECT 1').then(...).catch(...);

// co
co(function*() {
  var rows = yield p.query('SELECT 1');
})();

License

MIT