Permalink
Browse files

Merge pull request #137 from tone81/master

Fix postgres issue with camelCased column name during insert
  • Loading branch information...
2 parents 518de5c + 3073283 commit 92e5f2e42837411c8a197c451b7e09b5f2651be9 @kunklejr kunklejr committed Nov 25, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/driver/pg.js
View
@@ -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];

0 comments on commit 92e5f2e

Please sign in to comment.