Comparing version 0.6.7 to 0.6.8
@@ -63,2 +63,3 @@ //parses PostgreSQL server formatted date strings into javascript date objects | ||
var x = val.substring(1, val.length - 1); | ||
if (x === '') return []; | ||
x = x.match(/(NULL|[^,]+|"((?:.|\n|\r)*?)(?!\\)"|\{((?:.|\n|\r)*?(?!\\)\}) (,|$))/mg); | ||
@@ -69,3 +70,3 @@ if (x === null) throw "Not postgre array"; | ||
if (el[0] === '{') return arguments.callee(el); | ||
if (el[0] === '\"') return el.substring(1, el.length - 1).replace('\\\"', '\"'); | ||
if (el[0] === '\"') return el.substring(1, el.length - 1).replace(/\\(.)/g, '$1'); | ||
return el; | ||
@@ -72,0 +73,0 @@ }); |
{ "name": "pg", | ||
"version": "0.6.7", | ||
"version": "0.6.8", | ||
"description": "PostgreSQL client - pure javascript & libpq with the same API", | ||
@@ -4,0 +4,0 @@ "keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"], |
@@ -9,5 +9,2 @@ #node-postgres | ||
### notice | ||
node-postgres compiles native bindings when you install. The native bindings do not _currently_ compile with node v0.5.x. I'm working on support for v0.5.x. In the mean time if you get a compilation failure during installation you have still successfully installed the module; however, you cannot use the native bindings -- only the pure javascript bindings. | ||
## Examples | ||
@@ -125,2 +122,3 @@ | ||
* [AlexanderS](https://github.com/AlexanderS) | ||
* [ahtih](https://github.com/ahtih) | ||
@@ -127,0 +125,0 @@ ## Documentation |
@@ -64,2 +64,8 @@ var helper = require(__dirname + '/test-helper'); | ||
test("testing stringy array containing escaped strings", function(){ | ||
var input = '{"\\"\\"\\"","\\\\\\\\\\\\"}'; | ||
var expected = ['"""','\\\\\\']; | ||
assert.deepEqual(q.stringArrayParser(input), expected); | ||
}); | ||
test("testing NULL array", function(){ | ||
@@ -66,0 +72,0 @@ var input = '{NULL,NULL}'; |
5686
210489
166