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 ce49ac06
authored
Jan 22, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unneeded code
1 parent
c76d53f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
20 deletions
lib/dialects/mysql/connector-manager.js
lib/dialects/mysql/connector-manager.js
View file @
ce49ac0
...
@@ -164,11 +164,7 @@ module.exports = (function() {
...
@@ -164,11 +164,7 @@ module.exports = (function() {
return
queueItem
.
query
;
return
queueItem
.
query
;
}
}
if
(
!
this
.
isConnected
&&
!
this
.
pool
)
{
var
self
=
this
,
query
=
new
Query
(
null
,
this
.
sequelize
,
callee
,
options
||
{});
this
.
connect
()
}
var
self
=
this
,
query
=
new
Query
(
this
.
client
,
this
.
sequelize
,
callee
,
options
||
{});
this
.
pendingQueries
++
;
this
.
pendingQueries
++
;
query
.
options
.
uuid
=
this
.
config
.
uuid
query
.
options
.
uuid
=
this
.
config
.
uuid
...
@@ -195,20 +191,6 @@ module.exports = (function() {
...
@@ -195,20 +191,6 @@ module.exports = (function() {
return
query
;
return
query
;
};
};
ConnectorManager
.
prototype
.
connect
=
function
(
callback
)
{
var
self
=
this
;
// in case database is slow to connect, prevent orphaning the client
if
(
this
.
isConnecting
||
this
.
pool
)
{
return
;
}
connect
.
call
(
self
,
function
(
err
,
client
)
{
self
.
client
=
client
;
callback
(
err
,
client
);
return
;
});
return
;
};
ConnectorManager
.
prototype
.
getConnection
=
function
(
options
,
callback
)
{
ConnectorManager
.
prototype
.
getConnection
=
function
(
options
,
callback
)
{
var
self
=
this
;
var
self
=
this
;
...
@@ -219,10 +201,11 @@ module.exports = (function() {
...
@@ -219,10 +201,11 @@ module.exports = (function() {
return
new
Utils
.
CustomEventEmitter
(
function
(
emitter
)
{
return
new
Utils
.
CustomEventEmitter
(
function
(
emitter
)
{
if
(
!
self
.
pool
)
{
if
(
!
self
.
pool
)
{
// Regular client caching
if
(
self
.
client
)
{
if
(
self
.
client
)
{
return
emitter
.
emit
(
'success'
,
self
.
client
);
return
emitter
.
emit
(
'success'
,
self
.
client
);
}
else
{
}
else
{
// Cache for concurren
cy
// Cache for concurren
t queries
if
(
self
.
_getConnection
)
{
if
(
self
.
_getConnection
)
{
self
.
_getConnection
.
proxy
(
emitter
);
self
.
_getConnection
.
proxy
(
emitter
);
return
;
return
;
...
...
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