0.1.0 • Published 10 years ago
postgresql-tag v0.1.0
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 [clement.fiorio@gmail.com](mailto:clement.fiorio@gmail.com)
Contributors
0.1.0
10 years ago