pg-queries

Neat promise and event based access layer around node-postgres

pg-queries

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

npm install pg-queries

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) {
  // .... 
});

MIT