any-db-bind

3.1.18 • Public • Published

any-db-bind

Wrapper for any-db. Allow use named bind variables in query.

Description

The purpose of this library is to provide functionality of named bind variables for SQL database drivers any-db, while avoiding altering driver behaviour as much as possible.

Install

npm install any-db-bind --save

Usage

var anyDB = require('any-db-bind')(require('any-db'));
var conn = anyDB.createConnection(...);
var sql = 'SELECT * FROM questions WHERE answer = :test'
conn.query(sql, {'test': 42}, function (err, res) {})

License

MIT

Package Sidebar

Install

npm i any-db-bind

Weekly Downloads

18

Version

3.1.18

License

MIT

Unpacked Size

19.8 kB

Total Files

10

Last publish

Collaborators

  • tbepdb