Skip to content
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

add possibility to manage manually a connection with pool feature #742

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Drazke
Copy link

@Drazke Drazke commented Sep 4, 2016

Issue #284

New function :

db.driver.createPool(cb) --> return connectionId;
db.driver.releasePool(connectionId);

Updated function :

Model.create(data, connectionId, cb)
Instance.useConnection(connectionId).chainFunction()

@dxg
Copy link
Collaborator

dxg commented Sep 5, 2016

Looks pretty good, thanks.
@dresende what do you think?

@dresende
Copy link
Owner

dresende commented Sep 10, 2016

If it doesn't break anything, it's all good to me 👍

@qq85911308
Copy link

qq85911308 commented Feb 16, 2017

SELECT ... FOR UPDATE

Model.find().where("id = 1 FOR UPDATE").run(function(err, result){
...
});

in transaction i want to lock by select
is method useConnectionId can't use in model ?
@Drazke @dxg @dresende

@Ottunger
Copy link

Ottunger commented Jul 5, 2018

@Drazke @dresende Any update on this one, should it reach npm or should I check it out locally?
Same question for dresende/node-orm-transaction#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants