querybuildertotaldb
v1.0.0
Published
TotalDB SQL integrator
Downloads
2
Readme
Total.js QueryBuilder: TotalDB
A simple QueryBuilder integrator for Total DB.
- Documentation
$ npm install querybuildertotaldb
Initialization:
// require('querybuilderdb').init(name, url, [errorhandling]);
// name {String} a name of DB (default: "default")
// url {String} a URL address to the Total DB instance
// errorhandling {Function(err, cmd)}
require('querybuildertotaldb').init('default', CONF.database);
Usage:
DB().find('tbl_user').where('id', 1234).callback(console.log);
// DB('default').find('tbl_user').where('id', 1234).callback(console.log);