sqlite date macro support (#2491)

* sqlx-macros-core: Add handling of the 'DATE' pseudo-type in in the sqlite library.

Presently this only functions for the `time` feature, because I don't use the `chrono` feature.

* Update sqlite.rs

Add chrono date support.

* Update sqlite.rs

rustfmt

* Update sqlite.rs

Switch order of time::OffsetDateTime and time::PrimitiveDateTime.
This commit is contained in:
Elliot Speck 2023-07-01 07:56:32 +10:00 committed by GitHub
parent 87ff6457b9
commit 4b254ea1cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,17 +12,23 @@ impl_database_ext! {
String,
Vec<u8>,
#[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 = "time")]
sqlx::types::time::OffsetDateTime,
#[cfg(feature = "time")]
sqlx::types::time::PrimitiveDateTime,
#[cfg(feature = "time")]
sqlx::types::time::OffsetDateTime,
sqlx::types::time::Date,
#[cfg(feature = "uuid")]
sqlx::types::Uuid,