@@ -13,7 +13,7 @@ var PG = function(clientConstructor) {
1313 EventEmitter . call ( this ) ;
1414 this . Client = clientConstructor ;
1515 this . Connection = require ( __dirname + '/connection' ) ;
16- this . Query = clientConstructor . Query
16+ this . Query = clientConstructor . Query ;
1717 this . defaults = defaults ;
1818} ;
1919
@@ -25,8 +25,8 @@ PG.prototype.end = function() {
2525 pool . drain ( function ( ) {
2626 pool . destroyAllNow ( ) ;
2727 } ) ;
28- } )
29- }
28+ } ) ;
29+ } ;
3030
3131PG . prototype . connect = function ( config , callback ) {
3232 var self = this ;
@@ -42,14 +42,14 @@ PG.prototype.connect = function(config, callback) {
4242 var poolName = typeof ( c ) === 'string' ? c : c . user + c . host + c . port + c . database ;
4343 var pool = pools [ poolName ] ;
4444
45- if ( pool ) return pool . acquire ( cb ) ;
45+ if ( pool ) { return pool . acquire ( cb ) ; }
4646
47- var pool = pools [ poolName ] = genericPool . Pool ( {
47+ pool = pools [ poolName ] = genericPool . Pool ( {
4848 name : poolName ,
4949 create : function ( callback ) {
5050 var client = new self . Client ( c ) ;
5151 client . connect ( function ( err ) {
52- if ( err ) return callback ( err ) ;
52+ if ( err ) { return callback ( err ) ; }
5353
5454 //handle connected client background errors by emitting event
5555 //via the pg object and then removing errored client from the pool
@@ -74,17 +74,18 @@ PG.prototype.connect = function(config, callback) {
7474 log : defaults . poolLog
7575 } ) ;
7676 return pool . acquire ( cb ) ;
77- }
77+ } ;
7878
7979// cancel the query runned by the given client
8080PG . prototype . cancel = function ( config , client , query ) {
8181 var c = config ;
8282 //allow for no config to be passed
83- if ( typeof c === 'function' )
83+ if ( typeof c === 'function' ) {
8484 c = defaults ;
85+ }
8586 var cancellingClient = new this . Client ( c ) ;
8687 cancellingClient . cancel ( client , query ) ;
87- }
88+ } ;
8889
8990module . exports = new PG ( Client ) ;
9091
0 commit comments