mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 14:34:19 +00:00
Fixing format, removing duplicate NaiveDate
This commit is contained in:
parent
9d6c5defd4
commit
4b5f41eebe
1 changed files with 22 additions and 39 deletions
|
@ -64,6 +64,13 @@ impl_any_decode!(String);
|
|||
not(feature = "mssql")
|
||||
))]
|
||||
impl_any_type!(chrono::NaiveDate);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "postgres"),
|
||||
not(any(feature = "mssql", feature = "sqlite"))
|
||||
))]
|
||||
impl_any_type!(chrono::NaiveTime);
|
||||
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "sqlite", feature = "postgres"),
|
||||
|
@ -72,22 +79,10 @@ impl_any_type!(chrono::NaiveDate);
|
|||
impl_any_type!(chrono::DateTime<chrono::offset::Utc>);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any( feature = "sqlite", feature = "postgres"),
|
||||
any(feature = "sqlite", feature = "postgres"),
|
||||
not(any(feature = "mysql", feature = "mssql"))
|
||||
))]
|
||||
impl_any_type!(chrono::DateTime<chrono::offset::Local>);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "postgres"),
|
||||
not(any(feature = "mssql", feature = "sqlite"))
|
||||
))]
|
||||
impl_any_type!(chrono::NaiveDate);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "postgres"),
|
||||
not(any(feature = "mssql", feature = "sqlite"))
|
||||
))]
|
||||
impl_any_type!(chrono::NaiveTime);
|
||||
|
||||
// Encode
|
||||
#[cfg(all(
|
||||
|
@ -96,6 +91,12 @@ impl_any_type!(chrono::NaiveTime);
|
|||
not(feature = "mssql")
|
||||
))]
|
||||
impl_any_encode!(chrono::NaiveDate);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "postgres"),
|
||||
not(any(feature = "mssql", feature = "sqlite"))
|
||||
))]
|
||||
impl_any_encode!(chrono::NaiveTime);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "sqlite", feature = "postgres"),
|
||||
|
@ -104,22 +105,10 @@ impl_any_encode!(chrono::NaiveDate);
|
|||
impl_any_encode!(chrono::DateTime<chrono::offset::Utc>);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any( feature = "sqlite", feature = "postgres"),
|
||||
any(feature = "sqlite", feature = "postgres"),
|
||||
not(any(feature = "mysql", feature = "mssql"))
|
||||
))]
|
||||
impl_any_encode!(chrono::DateTime<chrono::offset::Local>);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "postgres"),
|
||||
not(any(feature = "mssql", feature = "sqlite"))
|
||||
))]
|
||||
impl_any_encode!(chrono::NaiveDate);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "postgres"),
|
||||
not(any(feature = "mssql", feature = "sqlite"))
|
||||
))]
|
||||
impl_any_encode!(chrono::NaiveTime);
|
||||
|
||||
// Decode
|
||||
#[cfg(all(
|
||||
|
@ -128,6 +117,12 @@ impl_any_encode!(chrono::NaiveTime);
|
|||
not(feature = "mssql")
|
||||
))]
|
||||
impl_any_decode!(chrono::NaiveDate);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "postgres"),
|
||||
not(any(feature = "mssql", feature = "sqlite"))
|
||||
))]
|
||||
impl_any_decode!(chrono::NaiveTime);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "sqlite", feature = "postgres"),
|
||||
|
@ -136,19 +131,7 @@ impl_any_decode!(chrono::NaiveDate);
|
|||
impl_any_decode!(chrono::DateTime<chrono::offset::Utc>);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any( feature = "sqlite", feature = "postgres"),
|
||||
any(feature = "sqlite", feature = "postgres"),
|
||||
not(any(feature = "mysql", feature = "mssql"))
|
||||
))]
|
||||
impl_any_decode!(chrono::DateTime<chrono::offset::Local>);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "postgres"),
|
||||
not(any(feature = "mssql", feature = "sqlite"))
|
||||
))]
|
||||
impl_any_decode!(chrono::NaiveDate);
|
||||
#[cfg(all(
|
||||
feature = "chrono",
|
||||
any(feature = "mysql", feature = "postgres"),
|
||||
not(any(feature = "mssql", feature = "sqlite"))
|
||||
))]
|
||||
impl_any_decode!(chrono::NaiveTime);
|
||||
|
|
Loading…
Reference in a new issue