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

Commit 98cd40a2 by Mick Hansen Committed by Jan Aagaard Meier

picking

1 parent 80963ff6
......@@ -92,6 +92,7 @@ module.exports = (function() {
}
DAOFactory.prototype.findAll = function(options) {
var start = tk.time();
if ((typeof options === 'object') && (options.hasOwnProperty('include'))) {
var includes = options.include
......@@ -102,6 +103,7 @@ module.exports = (function() {
}.bind(this))
}
this.daoFactoryManager.sequelize._metric('Model.findAll', tk.time() - start);
return this.QueryInterface.select(this, this.tableName, options)
}
......
......@@ -71,6 +71,7 @@ module.exports = (function() {
result = data
}
this.sequelize._metric("AbstractQuery.formatResults", tk.time() - start);
return result
}
......@@ -138,12 +139,7 @@ module.exports = (function() {
if (!!tableName) {
return
} else {
var regExp = new RegExp("^" + daoFactory.tableName + "\\.")
, match = attribute.match(regExp)
if (!!match) {
tableName = daoFactory.tableName
}
if (attribute.indexOf(daoFactory.tableName+".") === 0) tableName = daoFactory.tableName;
}
})
......@@ -211,7 +207,8 @@ module.exports = (function() {
}
var handleSelectQuery = function(results) {
var result = null
var start = tk.time(), _start;
var result = null, self = this;
if (this.options.raw) {
result = results
......@@ -241,6 +238,7 @@ module.exports = (function() {
result = (result.length === 0) ? null : result[0]
}
this.sequelize._metric("handleSelectQuery", tk.time() - start);
return result
}
......
......@@ -249,6 +249,7 @@ module.exports = (function() {
var queryAndEmit = function(sqlOrQueryParams, methodName, options) {
var self = this
var start = tk.time();
options = Utils._.extend({
success: function(){},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!