Socket
Socket
Sign inDemoInstall

pg

Package Overview
Dependencies
Maintainers
1
Versions
224
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.8.1 to 0.8.2

.travis.yml

8

lib/defaults.js

@@ -17,3 +17,7 @@ module.exports = {

rows: 0,
// binary result mode
binary: false,
//Connection pool options - see https://github.com/coopernurse/node-pool
//number of connections to use in connection pool

@@ -30,4 +34,4 @@ //0 will disable connection pooling

// binary result mode
binary: false
//pool log function / boolean
poolLog: false
}

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

idleTimeoutMillis: defaults.poolIdleTimeout,
reapIntervalMillis: defaults.reapIntervalMillis
reapIntervalMillis: defaults.reapIntervalMillis,
log: defaults.poolLog
});

@@ -75,0 +76,0 @@ return pool.acquire(cb);

@@ -11,3 +11,10 @@ var arrayParser = require(__dirname + "/arrayParser.js");

if(!match) {
return null;
dateMatcher = /^(\d{4})-(\d{2})-(\d{2})$/;
match = dateMatcher.test(isoDate);
if(!match) {
return null;
} else {
//it is a date in YYYY-MM-DD format
return new Date(isoDate);
}
}

@@ -141,2 +148,3 @@ var year = match[1];

register(16, parseBool);
register(1082, parseDate);
register(1114, parseDate);

@@ -143,0 +151,0 @@ register(1184, parseDate);

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

@@ -13,6 +13,6 @@ "keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],

"dependencies" : {
"generic-pool" : "1.0.9"
"generic-pool" : "1.0.12"
},
"scripts" : {
"test" : "make test",
"test" : "make test-all connectionString=pg://postgres@localhost:5432/postgres",
"install" : "node-gyp rebuild || (exit 0)"

@@ -19,0 +19,0 @@ },

#node-postgres
[![Build Status](https://secure.travis-ci.org/brianc/node-postgres.png)](http://travis-ci.org/brianc/node-postgres)
Non-blocking PostgreSQL client for node.js. Pure JavaScript and native libpq bindings. Active development, well tested, and production use.

@@ -4,0 +6,0 @@

@@ -1,2 +0,12 @@

var config = require(__dirname + '/../lib/utils').parseConnectionString(process.argv[2])
var config = {};
if(process.argv[2]) {
config = require(__dirname + '/../lib/utils').parseConnectionString(process.argv[2]);
}
//TODO use these environment variables in lib/ code
//http://www.postgresql.org/docs/8.4/static/libpq-envars.html
config.host = config.host || process.env['PGHOST'] || process.env['PGHOSTADDR'];
config.port = config.port || process.env['PGPORT'];
config.database = config.database || process.env['PGDATABASE'];
config.user = config.user || process.env['PGUSER'];
config.password = config.password || process.env['PGPASSWORD'];

@@ -3,0 +13,0 @@ for(var i = 0; i < process.argv.length; i++) {

@@ -148,1 +148,16 @@ var helper = require(__dirname + '/test-helper');

}))
if(!helper.config.binary) {
test("postgres date type", function() {
var client = helper.client();
client.on('error', function(err) {
console.log(err);
client.end();
});
client.query("SELECT '2010-10-31'::date", assert.calls(function(err, result){
assert.isNull(err);
assert.UTCDate(result.rows[0].date, 2010, 9, 31, 0, 0, 0, 0);
}));
client.on('drain', client.end.bind(client));
});
}

@@ -118,2 +118,10 @@ var helper = require(__dirname + '/test-helper');

},{
name: 'date',
format: 'text',
dataTypeID: 1082,
actual: '2010-10-31',
expected: function(val) {
assert.UTCDate(val, 2010, 9, 31, 0, 0, 0, 0);
}
},{
name: 'interval time',

@@ -120,0 +128,0 @@ format: 'text',

Sorry, the diff of this file is not supported yet

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