Replies: 2 comments
-
Okay, so I found this: let a: Vec<i32> = atable::table.select(a_dsl::id).load(&mut conn).await?; Is there some clever way to do this so that I don't have to explicitly type the variable? Or at least so that I only have to specify the i32 and not the Vec part of the type? |
Beta Was this translation helpful? Give feedback.
0 replies
-
And I found it: let a = atable::table.select(a_dsl::id).load::<i32>(&mut conn).await?; |
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
-
I use Postgresql. I have a table with a numeric id, like so:
And I want to just get a list of ids. I have defined this struct:
Is there any way that I could just define a Selectable on a primitive?
Something like this might be kinda cool if it does not exist:
Beta Was this translation helpful? Give feedback.
All reactions