Simplest query #3145
Unanswered
aaronhernan
asked this question in
Q&A
Simplest query
#3145
Replies: 1 comment
-
Why do you want to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a MySqlPool connection, but i cant get a vec of integers:
let ids: Vec<i64> = sqlx::query_as("SELECT id, id FROM table LIMIT 10").fetch_all(&pool).await?;
Compiler said:
the trait bound "for<'r> i64: FromRow<'r, MySqlRow>" is not satisfied
So, i am able to do:
let ids: Vec<(i64,)> = sqlx::query_as("SELECT id FROM table LIMIT 10").fetch_all(&pool).await?;
I guess it is because ( ) implements some traits?
Is there any way to just query a list (vec) or array of integers (ids)?
Beta Was this translation helpful? Give feedback.
All reactions