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 77b72e0a
authored
Oct 30, 2012
by
Mick Hansen
Committed by
Jan Aagaard Meier
Oct 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picking
1 parent
fcc59d1b
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 @
77b72e0
...
@@ -92,6 +92,7 @@ module.exports = (function() {
...
@@ -92,6 +92,7 @@ module.exports = (function() {
}
}
DAOFactory
.
prototype
.
findAll
=
function
(
options
)
{
DAOFactory
.
prototype
.
findAll
=
function
(
options
)
{
var
start
=
tk
.
time
();
if
((
typeof
options
===
'object'
)
&&
(
options
.
hasOwnProperty
(
'include'
)))
{
if
((
typeof
options
===
'object'
)
&&
(
options
.
hasOwnProperty
(
'include'
)))
{
var
includes
=
options
.
include
var
includes
=
options
.
include
...
@@ -102,6 +103,7 @@ module.exports = (function() {
...
@@ -102,6 +103,7 @@ module.exports = (function() {
}.
bind
(
this
))
}.
bind
(
this
))
}
}
this
.
daoFactoryManager
.
sequelize
.
_metric
(
'Model.findAll'
,
tk
.
time
()
-
start
);
return
this
.
QueryInterface
.
select
(
this
,
this
.
tableName
,
options
)
return
this
.
QueryInterface
.
select
(
this
,
this
.
tableName
,
options
)
}
}
...
...
lib/dialects/abstract/query.js
View file @
77b72e0
...
@@ -71,6 +71,7 @@ module.exports = (function() {
...
@@ -71,6 +71,7 @@ module.exports = (function() {
result
=
data
result
=
data
}
}
this
.
sequelize
.
_metric
(
"AbstractQuery.formatResults"
,
tk
.
time
()
-
start
);
return
result
return
result
}
}
...
@@ -138,12 +139,7 @@ module.exports = (function() {
...
@@ -138,12 +139,7 @@ module.exports = (function() {
if
(
!!
tableName
)
{
if
(
!!
tableName
)
{
return
return
}
else
{
}
else
{
var
regExp
=
new
RegExp
(
"^"
+
daoFactory
.
tableName
+
"\\."
)
if
(
attribute
.
indexOf
(
daoFactory
.
tableName
+
"."
)
===
0
)
tableName
=
daoFactory
.
tableName
;
,
match
=
attribute
.
match
(
regExp
)
if
(
!!
match
)
{
tableName
=
daoFactory
.
tableName
}
}
}
})
})
...
@@ -211,7 +207,8 @@ module.exports = (function() {
...
@@ -211,7 +207,8 @@ module.exports = (function() {
}
}
var
handleSelectQuery
=
function
(
results
)
{
var
handleSelectQuery
=
function
(
results
)
{
var
result
=
null
var
start
=
tk
.
time
(),
_start
;
var
result
=
null
,
self
=
this
;
if
(
this
.
options
.
raw
)
{
if
(
this
.
options
.
raw
)
{
result
=
results
result
=
results
...
@@ -241,6 +238,7 @@ module.exports = (function() {
...
@@ -241,6 +238,7 @@ module.exports = (function() {
result
=
(
result
.
length
===
0
)
?
null
:
result
[
0
]
result
=
(
result
.
length
===
0
)
?
null
:
result
[
0
]
}
}
this
.
sequelize
.
_metric
(
"handleSelectQuery"
,
tk
.
time
()
-
start
);
return
result
return
result
}
}
...
...
lib/query-interface.js
View file @
77b72e0
...
@@ -249,6 +249,7 @@ module.exports = (function() {
...
@@ -249,6 +249,7 @@ module.exports = (function() {
var
queryAndEmit
=
function
(
sqlOrQueryParams
,
methodName
,
options
)
{
var
queryAndEmit
=
function
(
sqlOrQueryParams
,
methodName
,
options
)
{
var
self
=
this
var
self
=
this
var
start
=
tk
.
time
();
options
=
Utils
.
_
.
extend
({
options
=
Utils
.
_
.
extend
({
success
:
function
(){},
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