Replies: 4 comments 7 replies
-
Yes. Your transaction scope is probably too large anyway if you want to do that. Keep your transactions small. |
Beta Was this translation helpful? Give feedback.
-
What's the aim of using a transaction in there, since then there's a redirect? |
Beta Was this translation helpful? Give feedback.
-
That's what a transaction is made for, but the point here, according to me, is when you are going to complete the transaction. |
Beta Was this translation helpful? Give feedback.
-
Isn't there a way to instrument DBIx::Class to open multiple connections? Then the question could be: how to determine the threshold to fire a new connection... |
Beta Was this translation helpful? Give feedback.
-
Using the Mojo::Pg Blog example, how could the $self->posts->add(...) call in the Posts controller be used in a transaction?
You need to get a database object with
my $db = $pg->db;
and then use that handle for all transaction calls, right?Beta Was this translation helpful? Give feedback.
All reactions