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

Commit c5140be5 by Sascha Depold

formatting

1 parent dd48d13c
Showing with 7 additions and 9 deletions
......@@ -109,8 +109,7 @@ module.exports = (function() {
if (!results[enumIdx]) {
sql = self.QueryGenerator.pgEnum(getTableName, keys[i], attributes[keys[i]], options)
chainer2.add(self.sequelize.query(sql, null, { raw: true }))
}
else if (!!results[enumIdx] && !!daoTable) {
} else if (!!results[enumIdx] && !!daoTable) {
var enumVals = self.QueryGenerator.fromArray(results[enumIdx].enum_value)
, vals = daoTable.rawAttributes[keys[i]].values
......@@ -138,7 +137,8 @@ module.exports = (function() {
sql = self.QueryGenerator.createTableQuery(tableName, attributes, options)
chainer2.run().success(function() {
queryAndEmit.call(self, sql, 'createTable')
queryAndEmit
.call(self, sql, 'createTable')
.success(function(res) {
self.emit('createTable', null)
emitter.emit('success', res)
......@@ -885,15 +885,13 @@ module.exports = (function() {
sqlOrQueryParams.push({})
}
query = this.sequelize.query.apply(this.sequelize, sqlOrQueryParams)
emitter.query = this.sequelize.query.apply(this.sequelize, sqlOrQueryParams)
} else {
query = this.sequelize.query(sqlOrQueryParams, null, {})
emitter.query = this.sequelize.query(sqlOrQueryParams, null, {})
}
// append the query for better testing
emitter.query = query
query
emitter
.query
.success(function(obj) {
options.success && options.success(obj)
this.emit(methodName, null)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!