Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 98cd40a2
authored
Oct 30, 2012
by
Mick Hansen
Committed by
Jan Aagaard Meier
Oct 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picking
1 parent
80963ff6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
lib/dao-factory.js
lib/dialects/abstract/query.js
lib/query-interface.js
lib/dao-factory.js
View file @
98cd40a
...
...
@@ -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
)
}
...
...
lib/dialects/abstract/query.js
View file @
98cd40a
...
...
@@ -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
}
...
...
lib/query-interface.js
View file @
98cd40a
...
...
@@ -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
(){},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment