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

forUpdate() should not require a transaction if Knex is used as a query builder only #2403

PatrLind opened this Issue Jan 2, 2018 · 1 comment


None yet
2 participants

PatrLind commented Jan 2, 2018

I use Knex as a query builder (not using the built in connection support) and I have problems with forUpdate() requiring a transaction.
I am using a transaction, but not via Knex. So if Knex is not connected to a database (used as a query builder only) I don't think it should require a transaction. To get around this problem I have to manually add the FOR UPDATE statement to my queries. Would it be possible to fix this?


This comment has been minimized.


elhigu commented Jan 2, 2018

Sounds like a legit use case. I don't see any reason why this couldn't be implemented.

wubzz added a commit to wubzz/knex that referenced this issue Feb 16, 2018

@wubzz wubzz closed this in #2475 Feb 16, 2018

wubzz added a commit that referenced this issue Feb 16, 2018

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