Comparing version 2.11.0 to 2.11.1
@@ -68,4 +68,9 @@ var types = require(__dirname + '/types/'); | ||
var inlineParser = function(fieldName, i) { | ||
return "\nthis['" + fieldName + "'] = " + | ||
"rowData[" + i + "] == null ? null : parsers[" + i + "](rowData[" + i + "]);"; | ||
return "\nthis['" + | ||
//fields containing single quotes will break | ||
//the evaluated javascript unless they are escaped | ||
//see https://github.com/brianc/node-postgres/issues/507 | ||
fieldName.replace("'", "\\'") + | ||
"'] = " + | ||
"rowData[" + i + "] == null ? null : parsers[" + i + "](rowData[" + i + "]);"; | ||
}; | ||
@@ -72,0 +77,0 @@ |
@@ -16,2 +16,4 @@ var textParsers = require(__dirname + '/textParsers'); | ||
//oid) into a result javascript type | ||
//note: the oid can be obtained via the following sql query: | ||
//SELECT oid FROM pg_type WHERE typname = 'TYPE_NAME_HERE'; | ||
var getTypeParser = function(oid, format) { | ||
@@ -18,0 +20,0 @@ if (!typeParsers[format]) { |
{ | ||
"name": "pg.js", | ||
"version": "2.11.0", | ||
"version": "2.11.1", | ||
"description": "node-postgres without the bindings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77637
2523