1.0.0 • Published 2 years ago

mysql-then v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.
1.0.0

2 years ago