mina-postgres-manager
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -23,2 +23,3 @@ (function() { | ||
this.query = bind(this.query, this); | ||
this.error = bind(this.error, this); | ||
this.client = new PG.Client(config); | ||
@@ -28,5 +29,18 @@ this.client.connect(); | ||
this._batch = []; | ||
this.client.on('error', this.error); | ||
this.drain(); | ||
} | ||
InstantConnect.prototype.error = function(err) { | ||
var batch, i, len, ref; | ||
LOGGER.log('Connection Error ' + err.message); | ||
ref = this._batch; | ||
for (i = 0, len = ref.length; i < len; i++) { | ||
batch = ref[i]; | ||
batch.fail(err); | ||
} | ||
this.drain(); | ||
return this.client.emit('drain'); | ||
}; | ||
InstantConnect.prototype.query = function(queryString, successFn, failFn) { | ||
@@ -87,3 +101,3 @@ return this.client.query(queryString).then((function(_this) { | ||
module.imports = InstantConnect; | ||
module.exports = InstantConnect; | ||
@@ -90,0 +104,0 @@ }).call(this); |
{ | ||
"name": "mina-postgres-manager", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "PostgresSQL Management Solution to wrap pg for mina etl", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14041
337