querybuildermysql2
v1.0.8
Published
MySQL integrator
Downloads
14
Readme
Total.js QueryBuilder: MySQL
A simple QueryBuilder integrator for MySQL database.
- Documentation
$ npm install querybuildermysql2
Initialization:
// require('querybuildermysql2').init(name, connectionstring, pooling, [errorhandling]);
// name {String} a name of DB (default: "default")
// connectionstring {String} a connection to the MySQL
// pooling {Number} max. clients (default: "0" (disabled))
// errorhandling {Function(err, cmd)}
require('querybuildermysql2').init('default', CONF.database);
// require('querybuildermysql').init('default', CONF.database, 10);
Usage:
DB().find('tbl_user').where('id', 1234).callback(console.log);
// DB('default').find('tbl_user').where('id', 1234).callback(console.log);