node-orm2
node-orm2 copied to clipboard
add possibility to manage manually a connection with pool feature
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()
Looks pretty good, thanks. @dresende what do you think?
If it doesn't break anything, it's all good to me 👍
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
@Drazke @dresende Any update on this one, should it reach npm or should I check it out locally? Same question for https://github.com/dresende/node-orm-transaction/pull/6