master-sql
v0.0.1
Published
A dynamic SQL query builder.
Downloads
3
Maintainers
Readme
MasterSQL
A dynamic SQL query builder.
setup
npm
npm i master-sql
ES module
import MasterSQL from 'master-sql';
Node
let MasterSQL = require('master-sql');
browser
<script src="https://unpkg.com/master-sql"></script>
The module is globally available as MasterSQL
.
usage
let sql = MasterSQL();
helpers
.buildWhereCondition(value)
Builds a where condition.
| argument | description |
| ---: | :--- |
| value
| A value to build the where condition from. |
Returns a string as the where condition.
let s = sql.buildWhereCondition([['A', 'B'], 'C']);
// => '(A OR B) AND C'