mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 06:24:16 +00:00
test: expose missing trait bounds for Json<Vec<x>>
This commit is contained in:
parent
8b4ef3f0b8
commit
90242494a8
1 changed files with 10 additions and 0 deletions
|
@ -141,4 +141,14 @@ mod json_tests {
|
|||
"SELECT CAST({0} AS BINARY) <=> CAST(? AS BINARY), CAST({0} AS BINARY) as _2, ? as _3",
|
||||
"\'{\"name\":\"Joe\",\"age\":33}\'" == Json(Friend { name: "Joe".to_string(), age: 33 })
|
||||
));
|
||||
|
||||
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
|
||||
struct Customer {
|
||||
json_column: Json<Vec<i64>>,
|
||||
}
|
||||
|
||||
test_type!(json_struct_json_column<Json<Customer>>(
|
||||
MySql,
|
||||
"\'{ \"json_column\": [1, 2] }\'" == Json(Customer { json_column: Json(vec![1, 2]) })
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue