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 98bd1f44
authored
Nov 12, 2011
by
Sascha Depold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lol@english
1 parent
5546c264
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
lib/query-chainer.js
lib/query.js
lib/query-chainer.js
View file @
98bd1f4
...
...
@@ -8,7 +8,7 @@ module.exports = (function() {
this
.
emitters
=
[]
this
.
fails
=
[]
this
.
finished
=
false
this
.
runned
=
false
this
.
wasRunning
=
false
this
.
eventEmitter
=
null
emitters
=
emitters
||
[]
...
...
@@ -25,7 +25,7 @@ module.exports = (function() {
QueryChainer
.
prototype
.
run
=
function
()
{
var
self
=
this
this
.
eventEmitter
=
new
Utils
.
CustomEventEmitter
(
function
()
{
self
.
runned
=
true
self
.
wasRunning
=
true
finish
.
call
(
self
)
})
return
this
.
eventEmitter
.
run
()
...
...
@@ -49,7 +49,7 @@ module.exports = (function() {
var
finish
=
function
(
result
)
{
this
.
finished
=
(
this
.
finishedEmits
==
this
.
emitters
.
length
)
if
(
this
.
finished
&&
this
.
runned
)
{
if
(
this
.
finished
&&
this
.
wasRunning
)
{
var
status
=
this
.
fails
.
length
==
0
?
'success'
:
'failure'
result
=
this
.
fails
.
length
==
0
?
result
:
this
.
fails
this
.
eventEmitter
.
emit
(
status
,
result
)
...
...
lib/query.js
View file @
98bd1f4
...
...
@@ -27,6 +27,8 @@ module.exports = (function() {
return
this
}
//private
var
bindClient
=
function
()
{
this
.
client
.
on
(
'error'
,
this
.
bindClientFunction
)
}
...
...
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