/pg-queries

Connection proxy for node-postgres

Primary LanguageJavaScript

pg-queries

Neat promise and event based access layer around node-postgres.

Installation

npm install pg-queries

Usage

Perform query(-ies) on particular connection.

var pgq = require('pg-queries');

pgq.connect().then(function(connection) {
  connection.query("select version()").then(function(rows) {
    // ....
  });
});

Immediate query.

var pgq = require('pg-queries');

pgq.query("select version()").then(function(rows) {
  // ....
});

License

MIT