npm.io
3.0.2 • Published 5 years ago

simple-pmysql

Licence
MIT
Version
3.0.2
Deps
6
Size
9 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

PMysql

npm i -S simple-pmysql
import P from 'bluebird'
import PMysql, { format as qFormat } from 'simple-pmysql'

let bdParams // = { host: ... }
let pMysql = PMysql(bdParams)
let select = qFormat('SELECT * FROM example WHERE id != ?', [ 0 ])

P.resolve()
    .then(() => pMysql.init())
    .then(() => pMysql.query(select).then(console.log))
    .then(() => pMysql.kill())

Keywords