postgres-bluebird

0.0.4 • Public • Published

postgres-bluebird

Node.js PostgreSQL driver, promisified by Bluebird - and using Bluebird's *Async suffix syntax

This package exposes a promisified version of pg's API, so you can use it in BlueBird's manner:

var pg = require('postgres-bluebird');
// pg API with *Async suffix
pg.connectAsync(...).spread(function(connection, release) {
     return connection.queryAsync("...")
         .then(function(result) {
            console.log("rows", result.rows);
         })
         .finally(function() {
            release();
         });
});

This package was inspired by this answer

Package Sidebar

Install

npm i postgres-bluebird

Weekly Downloads

0

Version

0.0.4

License

MIT

Last publish

Collaborators

  • lourenzo