Comparing version 0.6.13 to 0.6.14
@@ -38,3 +38,3 @@ function ArrayParser(source, converter) { | ||
entry = this.recorded.join(""); | ||
if (entry === "NULL") { | ||
if (entry === "NULL" && !includeEmpty) { | ||
entry = null; | ||
@@ -41,0 +41,0 @@ } |
{ "name": "pg", | ||
"version": "0.6.13", | ||
"version": "0.6.14", | ||
"description": "PostgreSQL client - pure javascript & libpq with the same API", | ||
@@ -4,0 +4,0 @@ "keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"], |
@@ -59,8 +59,9 @@ var helper = require(__dirname + "/test-helper"); | ||
test('null value', function(){ | ||
client.query("SELECT '{joe,null,bob}'::text[] as names", assert.success(function(result) { | ||
client.query("SELECT '{joe,null,bob,\"NULL\"}'::text[] as names", assert.success(function(result) { | ||
var names = result.rows[0].names; | ||
assert.lengthIs(names, 3); | ||
assert.lengthIs(names, 4); | ||
assert.equal(names[0], 'joe'); | ||
assert.equal(names[1], null); | ||
assert.equal(names[2], 'bob'); | ||
assert.equal(names[3], 'NULL'); | ||
pg.end(); | ||
@@ -67,0 +68,0 @@ })) |
215910
88
5864