Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pg.js

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg.js - npm Package Compare versions

Comparing version 3.0.4 to 3.1.0

4

lib/client.js

@@ -179,3 +179,3 @@ var crypto = require('crypto');

// haven't received a connection message yet !
var err = new Error("Stream unexpectedly ended before getting ready for query execution");
var err = new Error('Connection was ended during query');
callback(err);

@@ -186,3 +186,3 @@ callback = null;

if(self.activeQuery) {
var disconnectError = new Error('Stream unexpectedly ended during query execution');
var disconnectError = new Error('Connection was ended during query');
self.activeQuery.handleError(disconnectError, con);

@@ -189,0 +189,0 @@ self.activeQuery = null;

@@ -92,2 +92,6 @@ var net = require('net');

self.emit('sslconnect');
self.stream.on('error', function(error){
self.emit('error', error);
});
});

@@ -289,2 +293,3 @@ };

this.writer.add(emptyBuffer);
this._ending = true;
this._send(0x53);

@@ -296,4 +301,4 @@ };

this.writer.add(emptyBuffer);
this._ending = true;
this._send(0x58);
this._ending = true;
};

@@ -484,3 +489,3 @@

var DATA_ROW = 'dataRow';
var DataRowMessage = function(name, length, fieldCount) {
var DataRowMessage = function(length, fieldCount) {
this.name = DATA_ROW;

@@ -487,0 +492,0 @@ this.length = length;

@@ -22,7 +22,14 @@ var EventEmitter = require('events').EventEmitter;

var self = this;
Object.keys(self.pools.all).forEach(function(key) {
var keys = Object.keys(self.pools.all);
var count = keys.length;
keys.forEach(function(key) {
var pool = self.pools.all[key];
delete self.pools.all[key];
pool.drain(function() {
pool.destroyAllNow();
pool.destroyAllNow(function() {
count--;
if(count === 0) {
self.emit('end');
}
});
});

@@ -32,2 +39,3 @@ });

PG.prototype.connect = function(config, callback) {

@@ -34,0 +42,0 @@ if(typeof config == "function") {

@@ -121,8 +121,3 @@ //require the c++ bindings & export to javascript

if(!initialConnection) {
//TODO remove all the pause-drain stuff for v1.0
if(this._drainPaused) {
this._drainPaused++;
} else {
this.emit('drain');
}
this.emit('drain');
}

@@ -149,15 +144,2 @@ return;

//TODO remove all the pause-drain stuff for v1.0
Connection.prototype.pauseDrain = function() {
this._drainPaused = 1;
};
//TODO remove all the pause-drain stuff for v1.0
Connection.prototype.resumeDrain = function() {
if(this._drainPaused > 1) {
this.emit('drain');
}
this._drainPaused = 0;
};
Connection.prototype.sendCopyFail = function(msg) {

@@ -164,0 +146,0 @@ this.endCopyFrom(msg);

@@ -44,3 +44,3 @@ var EventEmitter = require('events').EventEmitter;

});
client.poolCount = 0;
return cb(null, client);

@@ -51,2 +51,3 @@ });

client._destroying = true;
client.poolCount = undefined;
client.end();

@@ -71,2 +72,3 @@ }

if(err) return cb(err, null, function() {/*NOOP*/});
client.poolCount++;
cb(null, client, function(err) {

@@ -73,0 +75,0 @@ if(err) {

{
"name": "pg.js",
"version": "3.0.4",
"version": "3.1.0",
"description": "node-postgres without the bindings",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc