2020-03-20 10:19:14 +08:00

39 lines
901 B
Rust

impl_database_ext! {
sqlx::postgres::Postgres {
bool,
String | &str,
i16,
i32,
i64,
f32,
f64,
// BYTEA
Vec<u8> | &[u8],
#[cfg(feature = "uuid")]
sqlx::types::Uuid,
#[cfg(feature = "chrono")]
sqlx::types::chrono::NaiveTime,
#[cfg(feature = "chrono")]
sqlx::types::chrono::NaiveDate,
#[cfg(feature = "chrono")]
sqlx::types::chrono::NaiveDateTime,
#[cfg(feature = "chrono")]
sqlx::types::chrono::DateTime<sqlx::types::chrono::Utc> | sqlx::types::chrono::DateTime<_>,
#[cfg(feature = "bigdecimal")]
sqlx::types::BigDecimal,
#[cfg(feature = "ipnetwork")]
sqlx::types::ipnetwork::IpNetwork
},
ParamChecking::Strong,
feature-types: info => info.type_feature_gate(),
row = sqlx::postgres::PgRow
}