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 34b69bfe
authored
Aug 06, 2013
by
Daniel Durante
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed up postgres client + query.run
1 parent
bff26805
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
lib/dialects/postgres/connector-manager.js
lib/dialects/postgres/connector-manager.js
View file @
34b69bf
...
...
@@ -37,12 +37,12 @@ module.exports = (function() {
self
.
pendingQueries
+=
1
return
new
Utils
.
CustomEventEmitter
(
function
(
emitter
)
{
self
.
connect
(
function
(
err
)
{
self
.
connect
(
function
(
err
,
client
)
{
if
(
!!
err
)
{
return
emitter
.
emit
(
'error'
,
err
)
}
var
query
=
new
Query
(
self
.
client
,
self
.
sequelize
,
callee
,
options
||
{})
var
query
=
new
Query
(
client
,
self
.
sequelize
,
callee
,
options
||
{})
return
query
.
run
(
sql
)
.
success
(
function
()
{
self
.
endQuery
.
call
(
self
)
})
...
...
@@ -64,7 +64,6 @@ module.exports = (function() {
ConnectorManager
.
prototype
.
connect
=
function
(
callback
)
{
var
self
=
this
var
emitter
=
new
(
require
(
'events'
).
EventEmitter
)()
// in case database is slow to connect, prevent orphaning the client
if
(
this
.
isConnecting
)
{
...
...
@@ -96,7 +95,7 @@ module.exports = (function() {
client
.
query
(
"SET TIME ZONE 'UTC'"
).
on
(
'end'
,
function
()
{
self
.
isConnected
=
true
self
.
client
=
client
callback
(
null
)
callback
(
null
,
client
)
});
}
else
{
self
.
client
=
null
...
...
@@ -116,8 +115,6 @@ module.exports = (function() {
connectCallback
(
null
,
this
.
client
)
}
}
return
emitter
}
ConnectorManager
.
prototype
.
disconnect
=
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