-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 forUpdate expression #84
Comments
So since |
Yes |
@glasscube42 - take a look, should be added & documented now. |
I seem to be having trouble with forUpdate against postgresql with knex 0.5.7. Code is.. knex.transaction(function(t) {
return knex('users')
.transacting(t)
.forUpdate()
.then(function (s) {
console.log(s);
return s;
});
})
.then(function(resp) {
console.log('TX complete! ' + JSON.stringify(resp));
return resp;
})
.catch(function(err) {
console.log('TX error! ' + err.message);
}); Outputs: 'TX error! Cannot call method 'then' of undefined' |
Fixing now. |
@llambda thanks for pointing this out... should be fixed, let me know if it's not working for you. |
@tgriesser Works good now. Thank you for fixing that. |
SELECT * FROM tableName WHERE ... LIMIT .. FOR UPDATE
The text was updated successfully, but these errors were encountered: