mustache-sql
v0.1.0
Published
hipster-style SQL template
Downloads
4
Readme
mustache-sql
hipster-style SQL template
install
npm install --save mustache-sql
example
let render = require('mustache-sql')
let template = 'UPDATE foobar SET {{property}} WHERE id = {{id}}'
let parameter = { id: 1, property: { foo: 'bar', num: 3.14 } }
render(template, parameter)
// UPDATE foobar SET `foo` = 'bar', `num` = 3.14 WHERE id = 1
features
{{valu}}
and{{{key}}}
are escaped by node-mysql- partials