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

Commit e46a9b38 by Guilherme Souza

Update lib/sequelize.js

Using options.type to define query type or getting it from the sql string
1 parent 7d681b31
Showing with 1 additions and 1 deletions
......@@ -141,7 +141,7 @@ module.exports = (function() {
options = Utils._.extend(Utils._.clone(this.options.query), options)
options = Utils._.extend(options, {
logging: this.options.hasOwnProperty('logging') ? this.options.logging : console.log,
type: (sql.toLowerCase().indexOf('select') === 0) ? 'SELECT' : false
type: options.type || (sql.toLowerCase().indexOf('select') === 0) ? 'SELECT' : false
})
return this.connectorManager.query(sql, callee, options)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!