mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-09-28 13:31:41 +00:00
fix(test): fix mismatched type error in MySQL type tests (#1517)
* fix new warning about trailing semicolon in expression macros * fix(test): fix mismatched type error in MySQL type tests
This commit is contained in:
parent
466d3f317d
commit
d25ab07f21
@ -15,7 +15,7 @@ macro_rules! assert_attribute {
|
||||
|
||||
macro_rules! fail {
|
||||
($t:expr, $m:expr) => {
|
||||
return Err(syn::Error::new_spanned($t, $m));
|
||||
return Err(syn::Error::new_spanned($t, $m))
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,8 @@ macro_rules! __test_prepared_type {
|
||||
#[macro_export]
|
||||
macro_rules! MySql_query_for_test_prepared_type {
|
||||
() => {
|
||||
"SELECT {0} <=> ?, {0}, ?"
|
||||
// MySQL 8.0.27 changed `<=>` to return an unsigned integer
|
||||
"SELECT CAST({0} <=> ? AS SIGNED INTEGER), {0}, ?"
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,8 @@ mod json_tests {
|
||||
|
||||
test_type!(json<JsonValue>(
|
||||
MySql,
|
||||
"SELECT CAST({0} AS BINARY) <=> CAST(? AS BINARY), CAST({0} AS BINARY) as _2, ? as _3",
|
||||
// MySQL 8.0.27 changed `<=>` to return an unsigned integer
|
||||
"SELECT CAST(CAST({0} AS BINARY) <=> CAST(? AS BINARY) AS SIGNED INTEGER), CAST({0} AS BINARY) as _2, ? as _3",
|
||||
"'\"Hello, World\"'" == json!("Hello, World"),
|
||||
"'\"😎\"'" == json!("😎"),
|
||||
"'\"🙋♀️\"'" == json!("🙋♀️"),
|
||||
@ -250,7 +251,8 @@ mod json_tests {
|
||||
|
||||
test_type!(json_struct<Json<Friend>>(
|
||||
MySql,
|
||||
"SELECT CAST({0} AS BINARY) <=> CAST(? AS BINARY), CAST({0} AS BINARY) as _2, ? as _3",
|
||||
// MySQL 8.0.27 changed `<=>` to return an unsigned integer
|
||||
"SELECT CAST(CAST({0} AS BINARY) <=> CAST(? AS BINARY) AS SIGNED INTEGER), CAST({0} AS BINARY) as _2, ? as _3",
|
||||
"\'{\"name\":\"Joe\",\"age\":33}\'" == Json(Friend { name: "Joe".to_string(), age: 33 })
|
||||
));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user