mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
fix test - single empty string entry
This commit is contained in:
parent
369357a71f
commit
cdc8c09c37
@ -31,9 +31,9 @@ ArrayParser.prototype.nextChar = function() {
|
||||
ArrayParser.prototype.record = function(char) {
|
||||
return this.recorded.push(char);
|
||||
};
|
||||
ArrayParser.prototype.newEntry = function() {
|
||||
ArrayParser.prototype.newEntry = function(includeEmpty) {
|
||||
var entry;
|
||||
if (this.recorded.length > 0) {
|
||||
if (this.recorded.length > 0 || includeEmpty) {
|
||||
entry = this.recorded.join("");
|
||||
if (entry === "NULL") {
|
||||
entry = null;
|
||||
@ -70,7 +70,7 @@ ArrayParser.prototype.parse = function(nested) {
|
||||
}
|
||||
} else if (c.char === '"' && !c.escaped) {
|
||||
if (quote) {
|
||||
this.newEntry();
|
||||
this.newEntry(true);
|
||||
}
|
||||
quote = !quote;
|
||||
} else if (c.char === ',' && !quote) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user