How can I make tokio run multiple sqlx executions at the same time? #4590
-
I am trying to build a tool to execute SQL against YugabyteDB, a PostgreSQL compatible database. This works great for sequentially executed SQL.
this returns the following error:
How can I make rust execute multiple sqlx queries at the same time? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The async block that you are spawning doesn't return a |
Beta Was this translation helpful? Give feedback.
The async block that you are spawning doesn't return a
Result
, so you can't use the question mark operator. Either stop using the question mark operator or have it return aResult
. It has nothing to do with sqlx.