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

Commit 551c4e7e by Sascha Depold

pass the dialect to the formatter

1 parent c48a0bb1
Showing with 2 additions and 1 deletions
......@@ -70,10 +70,11 @@ module.exports = (function() {
DAOFactory.prototype[methodName] = function() {
var dataset = this.dataset()
, result = dataset[methodName].apply(dataset, arguments)
, dialect = this.daoFactoryManager.sequelize.options.dialect
result.toSql = function() {
var query = result.toQuery()
return SqlString.format(query.text.replace(/(\$\d)/g, '?'), query.values) + ';'
return SqlString.format(query.text.replace(/(\$\d)/g, '?'), query.values, null, dialect) + ';'
}
result.exec = function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!