mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 23:35:20 +00:00
Don't test custom records until we have some kind of fixtures
This commit is contained in:
parent
ff722d0e62
commit
fb5db48c52
@ -28,14 +28,15 @@ enum Strong {
|
|||||||
Three,
|
Three,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Figure out a good solution for custom type testing
|
||||||
// Records must map to a custom type
|
// Records must map to a custom type
|
||||||
// Note that all types are types in Postgres
|
// Note that all types are types in Postgres
|
||||||
#[derive(PartialEq, Debug, sqlx::Type)]
|
// #[derive(PartialEq, Debug, sqlx::Type)]
|
||||||
#[sqlx(postgres(oid = 12184))]
|
// #[sqlx(postgres(oid = 12184))]
|
||||||
struct PgConfig {
|
// struct PgConfig {
|
||||||
name: String,
|
// name: String,
|
||||||
setting: Option<String>,
|
// setting: Option<String>,
|
||||||
}
|
// }
|
||||||
|
|
||||||
test_type!(transparent(
|
test_type!(transparent(
|
||||||
Postgres,
|
Postgres,
|
||||||
@ -60,25 +61,26 @@ test_type!(strong_enum(
|
|||||||
"'four'::text" == Strong::Three
|
"'four'::text" == Strong::Three
|
||||||
));
|
));
|
||||||
|
|
||||||
test_type!(record_pg_config(
|
// TODO: Figure out a good solution for custom type testing
|
||||||
Postgres,
|
// test_type!(record_pg_config(
|
||||||
PgConfig,
|
// Postgres,
|
||||||
// (CC,gcc)
|
// PgConfig,
|
||||||
"(SELECT ROW('CC', 'gcc')::pg_config)"
|
// // (CC,gcc)
|
||||||
== PgConfig {
|
// "(SELECT ROW('CC', 'gcc')::pg_config)"
|
||||||
name: "CC".to_owned(),
|
// == PgConfig {
|
||||||
setting: Some("gcc".to_owned()),
|
// name: "CC".to_owned(),
|
||||||
},
|
// setting: Some("gcc".to_owned()),
|
||||||
// (CC,)
|
// },
|
||||||
"(SELECT '(\"CC\",)'::pg_config)"
|
// // (CC,)
|
||||||
== PgConfig {
|
// "(SELECT '(\"CC\",)'::pg_config)"
|
||||||
name: "CC".to_owned(),
|
// == PgConfig {
|
||||||
setting: None,
|
// name: "CC".to_owned(),
|
||||||
},
|
// setting: None,
|
||||||
// (CC,"")
|
// },
|
||||||
"(SELECT '(\"CC\",\"\")'::pg_config)"
|
// // (CC,"")
|
||||||
== PgConfig {
|
// "(SELECT '(\"CC\",\"\")'::pg_config)"
|
||||||
name: "CC".to_owned(),
|
// == PgConfig {
|
||||||
setting: Some("".to_owned()),
|
// name: "CC".to_owned(),
|
||||||
}
|
// setting: Some("".to_owned()),
|
||||||
));
|
// }
|
||||||
|
// ));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user