From bc952b3787cd9a124e0f189a19721adadbda390a Mon Sep 17 00:00:00 2001 From: Jaebum Lee Date: Sun, 21 Nov 2021 23:36:13 -0800 Subject: [PATCH] Add TryFromU64 trait for `DateTime`. The timestamp column (with time zone) generates the field with `chrono::DateTime`. Sadly, `DeriveEntityModel` macro fails because `TryFromU64` is not implemented for this type. I added the trivial implementation for `chrono::DateTime`. --- src/executor/query.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/executor/query.rs b/src/executor/query.rs index 12d0c7cf..dc2bb51a 100644 --- a/src/executor/query.rs +++ b/src/executor/query.rs @@ -544,3 +544,6 @@ try_from_u64_err!(Vec); #[cfg(feature = "with-uuid")] try_from_u64_err!(uuid::Uuid); + +#[cfg(feature = "with-chrono")] +try_from_u64_err!(chrono::DateTime);