0.1.0 • Published 10 years ago

postgresql-tag v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

pg-sql-tag

Use ES6 tagged template string to generate query objects which can be escaped by node-postgres.

Status

npm version

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

Elie Rotenberg