不要怂,就是干,撸起袖子干!

Commit 11f877ef by Dirk Raeder

Using quoteIdentifier() to wrap attribute names

1 parent 44195515
Showing with 2 additions and 2 deletions
......@@ -364,10 +364,10 @@ module.exports = (function() {
return Utils._.template(query, {
tableName: tableName,
attributeNamesImport: Utils._.keys(attributes).map(function(attr) {
return (attrNameAfter === attr) ? '`' + attrNameBefore + '` AS `' + attr + '`' : '`' + attr + '`'
return (attrNameAfter === attr) ? this.quoteIdentifier(attrNameBefore) + ' AS ' + this.quoteIdentifier(attr) : this.quoteIdentifier(attr);
}.bind(this)).join(', '),
attributeNamesExport: Utils._.keys(attributes).map(function(attr) {
return '`' + attr + '`'
return this.quoteIdentifier(attr);
}.bind(this)).join(', ')
});
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!