Skip to content

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

Open
Drazke wants to merge 2 commits into
dresende:masterfrom
Drazke:master
Open

add possibility to manage manually a connection with pool feature#742
Drazke wants to merge 2 commits into
dresende:masterfrom
Drazke:master

Conversation

@Drazke

@Drazke Drazke commented Sep 4, 2016

Copy link
Copy Markdown

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

dxg commented Sep 5, 2016

Copy link
Copy Markdown
Collaborator

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

@dresende

dresende commented Sep 10, 2016

Copy link
Copy Markdown
Owner

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

@dada-net

dada-net commented Feb 16, 2017

Copy link
Copy Markdown

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

Ottunger commented Jul 5, 2018

Copy link
Copy Markdown

@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.

5 participants