Fixing format, removing duplicate NaiveDate

This commit is contained in:
Nathan Roach 2021-02-26 08:42:12 -05:00 committed by Ryan Leckey
parent 9d6c5defd4
commit 4b5f41eebe

View file

@ -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);