mysql-then

1.0.0 • Public • Published

mysql-then

A tiny lib just to expose the mysql drivers for node.js in a promise-friendly way.

Usage

const mysqli = require("mysql-then");

const connection = mysqli.createConnection({
  host: "...",
  port: "...",
  password: "...",
  user: "..."
});

(async () => {
  await connection.connect();
  const rows = await connection.query("SELECT 'fun';");
  console.log(rows[0].fun); // 'fun'
  await connection.end();
})();

Anything more?

  • A proposed type system is still to be worked out.
  • make helper functions to do more with the results than just expose them.

Package Sidebar

Install

npm i mysql-then

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.4 kB

Total Files

4

Last publish

Collaborators

  • itp2023