-
-
Notifications
You must be signed in to change notification settings - Fork 58
feat(getDbInstance): Added getDbInstance method #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: BorntraegerMarc <[email protected]>
@wzrdtales Created new PR to comply to all project requirements. Tests look OK to you? |
Looks good so far, I had a look over this again now, did you tested this for functionality? As you call this callback here, the river would get closed before it gets to the user, this would need to keep open, which also needs some information for the user that they need to close the connection when they request an instance in that way. |
…stance method is called Signed-off-by: BorntraegerMarc <[email protected]>
@wzrdtales good catch! I've added an |
I would rather call |
df89adc
to
b66d8ba
Compare
Signed-off-by: BorntraegerMarc <[email protected]>
b66d8ba
to
0a86931
Compare
index.js
Outdated
@@ -345,6 +357,9 @@ var MongodbDriver = Base.extend({ | |||
case 'updateMany': | |||
db.collection(collection)[command](options.query, options.update, options.options, callbackFunction); | |||
break; | |||
case 'getDbInstance': | |||
prCB(null, db); // When the user wants to get the DB instance we need to retrun the promise callback, so the DB connection is not automatically closed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wzrdtales like this you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I typo slipped in retrun
instead of return
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wzrdtales Good catch 😄 Corrected it
Signed-off-by: BorntraegerMarc <[email protected]>
Looks good, merging at this point. |
Thanks @wzrdtales ! Could you release a new npm version so I can test out the functionality? 😄 |
later this evening yes (I'm gmt+1 though) |
Was just published as |
Signed-off-by: BorntraegerMarc [email protected]