Browse Source

Alias 'this' because we're in a closure

revert-array-changes
Eric Perry 9 years ago
parent
commit
bc10263b42
  1. 3
      lib/dialect/postgres.js

3
lib/dialect/postgres.js

@ -41,9 +41,10 @@ Postgres.prototype._getParameterValue = function(value, quoteChar) {
} else if ('object' === typeof value) {
if (_.isArray(value)) {
// convert each element of the array
var self = this;
value = value.map(function (item) {
// In a Postgres array, strings must be double-quoted
return this._getParameterValue(item, '"');
return self._getParameterValue(item, '"');
});
value = '\'{' + value.join(',') + '}\'';
} else if (_.isFunction(value.toISOString)) {

Loading…
Cancel
Save