JSPM

postgresql-tag

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q23800F
  • License MIT

A pg plugin for `sql-tag`

Package Exports

  • postgresql-tag

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postgresql-tag) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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>

Contributors

Elie Rotenberg