I'm using sqlx both within and without a transaction, but now I need to use Executor multiple times and BANG! #2509
Replies: 3 comments
-
0 replies since May?? What is going on on this community, I've lost so many hours because of this issue please someone help!! |
Beta Was this translation helpful? Give feedback.
-
This is a situation where you you may need |
Beta Was this translation helpful? Give feedback.
-
I found out a trick that worked.
Connection implementations such as So basically I changed the type that my functions receive from They explain this on the Changelog of the 0.7.0 version |
Beta Was this translation helpful? Give feedback.
-
Dear sqlx team, first of all: THANK YOU for all the precious effort you put into making this masterpiece project! THANK YOU!
I would like to share with you a small (simplified) project in which I use
sqlx
.I'm stuck because I can't use the
PgExecutor
multiple time in the same method.I would like your help to better understand what to use here because I read all the docs and all the issues but cannot find a way.
As you can see in my code I have methods that I can use both within a transaction or not.
Hence I tried to use
impl sqlx::PgExecutor<'_>
as argument and it worked.But now I need to use it multiple times in the same method, like this:
The example is running here: https://www.rustexplorer.com/b/a7yv5f
The error is:
I know you're working on a
0.7
version. Can I try it right now? Is it possible with 0.7 to useExecutor
multiple times?Beta Was this translation helpful? Give feedback.
All reactions