Replies: 2 comments
-
I believe this is what you are looking for: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Is there a way to do a type override for INSERT queries. This obviously doesn't work:
I know I can convert |
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
-
e.g. I have a simple enum in rust
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
pub enum TradeType {
Buy,
Sell,
}
pub struct Trade {
pub trade_type: TradeType
}
What can I do to map this struct to a table where trade_type is defined as VARCHAR
Currently I get compilation errors e.g. (expected enum '...', found struct std::string::String) when using macros like sqlx::query_as!
How do I find such topics in docs?
Beta Was this translation helpful? Give feedback.
All reactions