Skip to content
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.

hden/mustache-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mustache-sql Build Status

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

  • {{value}} and {{{key}}} are escaped by node-mysql
  • partials

About

hipster-style SQL template

Resources

License

Stars

Watchers

Forks

Packages

No packages published