You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MariaDB "RETURNING" with query_as return MySqlRow instead of struct. The same code works perfectly in sqlite and postgres.
Minimal Reproduction
let maison = sqlx::query_as!(Maison, r#"INSERT INTO maison (id ,adresse ,taille ,piscine) VALUES (?, ?, ?, ?) RETURNING id as "id!:_",adresse as "adresse!:_",taille as "taille!:_",piscine"#, 5, "lieu5",23, true).fetch_one(&p.pool).await.unwrap();assert_eq!(maison, Maison{id:5, adresse:"lieu5".to_string(), taille: 23, piscine:Some(true)});
error:
error[E0369]: binary operation `==` cannot be applied to type `sqlx::mysql::MySqlRow`
--> tests/commons/tests/insert.rs:41:5
|
41 | assert_eq!(maison, Maison{id:5, adresse:"lieu5".to_string(), taille: 23, piscine:Some(true)});
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| sqlx::mysql::MySqlRow
| commons::entities::my::Maison
|
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
Info
SQLx version: 0.6.3
SQLx features enabled: "runtime-async-std-native-tls", "uuid", "chrono", "bigdecimal",
Database server and version: MariaDB 10..1
Operating system: arch linux (garuda)
rustc --version: 1.68.2
The text was updated successfully, but these errors were encountered:
Bug Description
MariaDB "RETURNING" with query_as return MySqlRow instead of struct. The same code works perfectly in sqlite and postgres.
Minimal Reproduction
error:
Info
rustc --version
: 1.68.2The text was updated successfully, but these errors were encountered: