0.0.1 • Published 4 years ago

master-sql v0.0.1

Weekly downloads
19
License
MIT
Repository
github
Last release
4 years ago

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.

argumentdescription
valueA 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'