node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…

ezpg

ezpg <a href="https://build.deliveryrelay.com/chevett/ezpg"><img src="https://build.deliveryrelay.com/chevett/ezpg/badge" /></a> ====

ezpg

var ezpg = require('ezpg');
 
 
ezpg.connection(function(err, client, done){
    // normal pq stuff 
    client.query('select 1;', function(err, result){
        //done() 
    });
 
    // ez'er pg function 
    client.func('pg_database_size', ['template1'], function(err, result){
        console.log('your db is ' + result[0] + 'bytes.');
        done();
    });
});
 
ezpg.transaction(function(err, client, commit, rollback){
    client.query('create table relay.thisismynewtabkldasfadsfdsfads(id smallint);', function(err, result){
        
        // jk 
        rollback();
    });
});