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

pg

Package Overview
Dependencies
Maintainers
1
Versions
225
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

build/.wafpickle-7

2

lib/index.js

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

create: function(callback) {
var client = new Client(c);
var client = new ClientConstructor(c);
client.connect();

@@ -29,0 +29,0 @@ var connectError = function(err) {

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

p._pulseQueryQueue = function() {
p._pulseQueryQueue = function(initialConnection) {
if(!this._connected) {

@@ -38,3 +38,5 @@ return;

if(!query) {
this.emit('drain');
if(!initialConnection) {
this.emit('drain');
}
return;

@@ -70,3 +72,3 @@ }

connection._connected = true;
connection._pulseQueryQueue();
connection._pulseQueryQueue(true);
});

@@ -104,2 +106,3 @@

var NativeQuery = function(text, values, callback) {
//TODO there are better ways to detect overloads
if(typeof text == 'object') {

@@ -109,3 +112,8 @@ this.text = text.text;

this.name = text.name;
this.callback = values;
if(typeof values === 'function') {
this.callback = values;
} else if(typeof values !== 'undefined') {
this.values = values;
this.callback = callback;
}
} else {

@@ -112,0 +120,0 @@ this.text = text;

{ "name": "pg",
"version": "0.5.4",
"version": "0.5.5",
"description": "PostgreSQL client - pure javascript & libpq with the same API",

@@ -4,0 +4,0 @@ "keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],

@@ -114,2 +114,3 @@ #node-postgres

* [booo](https://github.com/booo)
* [neonstalwart](https://github.com/neonstalwart)

@@ -116,0 +117,0 @@ ## Documentation

@@ -132,1 +132,15 @@ var helper = require(__dirname + '/../test-helper');

})
test('can provide callback and config and parameters', function() {
pg.connect(connectionString, assert.calls(function(err, client) {
assert.isNull(err);
var config = {
text: 'select $1::text as val'
};
client.query(config, ['hi'], assert.calls(function(err, result) {
assert.isNull(err);
assert.equal(result.rows.length, 1);
assert.equal(result.rows[0].val, 'hi');
}))
}))
})

@@ -52,2 +52,5 @@ require.paths.unshift(__dirname + '/../lib/');

var actualMonth = actual.getUTCMonth();
assert.equal(actualMonth, month, "expected month " + month + " but got " + actualMonth);
var actualDate = actual.getUTCDate();

@@ -54,0 +57,0 @@ assert.equal(actualDate, day, "expected day " + day + " but got " + actualDate);

@@ -78,3 +78,3 @@ var helper = require(__dirname + '/test-helper');

expected: function(val) {
assert.UTCDate(val, 2011, 01, 24, 4, 5, 00, 680);
assert.UTCDate(val, 2011, 0, 24, 4, 5, 00, 680);
}

@@ -81,0 +81,0 @@ }, {

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