Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #137 from tone81/master

Fix postgres issue with camelCased column name during insert
  • Loading branch information...
commit 92e5f2e42837411c8a197c451b7e09b5f2651be9 2 parents 518de5c + 3073283
@kunklejr kunklejr authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/driver/pg.js
View
8 lib/driver/pg.js
@@ -174,6 +174,14 @@ var PgDriver = Base.extend({
}
},
+ insert: function(tableName, columnNameArray, valueArray, callback) {
+ columnNameArray = columnNameArray.map(function(columnName) {
+ return (columnName.charAt(0) != '"') ? '"' + columnName + '"' : columnName;
+ });
+
+ return this._super(tableName, columnNameArray, valueArray, callback);
+ },
+
runSql: function() {
var callback = arguments[arguments.length - 1];
Please sign in to comment.
Something went wrong with that request. Please try again.