pg-sql-tag
A pg plugin for sql-tag, combinining the elegance of tagged sql query strings with the convenience and safety of pg.query
.
Status
This module has been deprecated in favour of sql-tag@^1.0.0, which is now able to handle pg
queries without requiring any modification to pg.query
.
Installation
Install the package via npm
:
$ npm install pg-sql-tag
Usage
var pg = ;var sql = ; // Wrap `pg` in order to support queries// generated by the `sql` tag.pg; // Use expressions inside placeholders to build elegant// and readable queries.pg; // You can even use function calls inside expressions.var obj = foo: 'bar' pg;
Tests
$ npm test
License
MIT