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

Commit f178b9ef by Sascha Depold

removed old code

1 parent a8efaea4
Showing with 0 additions and 30 deletions
......@@ -225,36 +225,6 @@ module.exports = (function() {
return queryAndEmit.call(this, [sql, dao], 'increment');
}
QueryInterface.prototype.reload = function(dao, tableName) {
var self = this
return new Utils.CustomEventEmitter(function(emitter) {
var sql = self.QueryGenerator.selectQuery(tableName, { where: { id : dao.id }, limit: 1 })
, calleeStub = {
build: function (values) {
// We cannot use setAttributes here, since a refresh might also update the read only attributes
Utils._.each(values, function(value, attr) {
(dao.attributes.indexOf(attr) > -1) && (dao[attr] = value)
})
}
}
, qry = self.sequelize.query(sql, calleeStub, { plain: true, raw: false, type: 'SELECT' })
qry
.success(function () {
self.emit('refresh', null)
emitter.emit('success', dao)
})
.error(function(err) {
self.emit('refresh', err)
emitter.emit('error', err)
})
.on('sql', function(sql) {
emitter.emit('sql', sql)
})
}).run()
}
QueryInterface.prototype.rawSelect = function(tableName, options, attributeSelector) {
var self = this
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!