0.2.2 • Published 9 years ago

mysql-as-promised v0.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

mysql-as-promised Build Status

Yet another mysql wrapper using promises.

Why yet another?

Because every wrapper I found does things that I don't want:

  • I don't want a dependency on a promise library (or native-or-bluebird). ES6 is there now, and if it isn't, there are polyfills.
  • I don't want a different API than the original mysql module. I just want the same API with promises.

Installation

npm install --save mysql-as-promised

Usage

import mysql from 'mysql-as-promised';

let pool = mysql.createPool('mysql://test@localhost/test');
let connection = await pool.getConnection();
let rows = await connection.query('SELECT ? + ? AS solution', [2, 3]);
console.log(rows[0].solution); // => 5
connection.release();
await pool.end();

To do

  • Complete the API (I implemented only what I needed).

License

MIT

0.2.2

9 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago