pool-sql

1.0.11 • Public • Published

pool-sql

wrap node mysql to make more reliable connections using pools

var index = require("./pool-sql.js");
var fs = require("fs");
var config = JSON.parse(fs.readFileSync("./config.json","utf8"));
var pool = new index({"host":config.host,"username":config.username,"password":config.password});
var mysqlCommand = pool.mysqlCommand;
mysqlCommand("select * from db.table where something=true;",function(err,res,fields){
    //not sure what fields are
    if(typeof err="undefined")console.log(err);
    else{

    }
});


Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i pool-sql

    Weekly Downloads

    0

    Version

    1.0.11

    License

    ISC

    Unpacked Size

    2.74 kB

    Total Files

    4

    Last publish

    Collaborators

    • projectoblio