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']);