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

Commit 5909e286 by Sascha Depold

formatting

1 parent 8fd3fdc9
Showing with 8 additions and 3 deletions
...@@ -191,9 +191,11 @@ module.exports = (function() { ...@@ -191,9 +191,11 @@ module.exports = (function() {
options = Utils._.extend({}, this.options, options || {}) options = Utils._.extend({}, this.options, options || {})
var self = this var self = this
return new Utils.CustomEventEmitter(function(emitter) { return new Utils.CustomEventEmitter(function(emitter) {
var doQuery = function() { var doQuery = function() {
self.QueryInterface self
.QueryInterface
.createTable(self.getTableName(), self.attributes, options) .createTable(self.getTableName(), self.attributes, options)
.success(function() { emitter.emit('success', self) }) .success(function() { emitter.emit('success', self) })
.error(function(err) { emitter.emit('error', err) }) .error(function(err) { emitter.emit('error', err) })
...@@ -201,7 +203,10 @@ module.exports = (function() { ...@@ -201,7 +203,10 @@ module.exports = (function() {
} }
if (options.force) { if (options.force) {
self.drop(options).success(doQuery).error(function(err) { emitter.emit('error', err) }) self
.drop(options)
.success(doQuery)
.error(function(err) { emitter.emit('error', err) })
} else { } else {
doQuery() doQuery()
} }
...@@ -1020,7 +1025,7 @@ module.exports = (function() { ...@@ -1020,7 +1025,7 @@ module.exports = (function() {
} }
DAOFactory.prototype.__setSqlDialect = function() { DAOFactory.prototype.__setSqlDialect = function() {
var dialect = this.daoFactoryManager.sequelize.options.dialect var dialect = this.daoFactoryManager.sequelize.options.dialect
this.__sql = sql.setDialect(dialect === 'mariadb' ? 'mysql' : dialect) this.__sql = sql.setDialect(dialect === 'mariadb' ? 'mysql' : dialect)
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!