postgresql-tag
v0.1.0
Published
A pg plugin for `sql-tag`
Downloads
4
Maintainers
Readme
pg-sql-tag
Use ES6 tagged template string to generate query objects which can be escaped by node-postgres
.
Status
Installation
Install the package via npm
:
$ npm install postgresql-tag
Usage
import pgsql from 'pgsql-tag';
const email = readEmailFromUntrustedInput();
// email will be escaped
pg.query(pgsql`SELECT name FROM users WHERE email=${email}`, (err, res) => ...);
License
MIT Clément Fiorio <[email protected]>