-
Notifications
You must be signed in to change notification settings - Fork 37
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
Attempting to execute query on connection while inside a runTx
call.
#391
Comments
@richardo-gluon: Could you please clarify what you want to achieve here? Are you trying to run statements that are outside of the transaction? |
What I want to achieve here is this
|
You can do that by not using the outer connection inside the callback block:
Background: if a physical connection gets into the transaction via the |
I see, that makes sense. Thanks for explaining! |
@isoos I am running server side using Dart, conduit. The way it works is I put some controllers on stand by for each endpoint I have, then I run the server. Something like this "v1/help" => HelpController The problem that I see is, if inside the HelpController I have to run a DB transaction, does that mean I have to create a new connection? if yes, what if there are 100 occurrences that hit my API v1/help, does that mean I have to establish 100 connection in parallel? |
Use connection pooling for that. Not sure what conduit recommends for it, |
I wonder why there is this check in the code
as far as I understand, using context inside a transaction to query is okay, because sometimes we need to query the data from other tables, etc.
The text was updated successfully, but these errors were encountered: