Skip to content

Commit

Permalink
Merge pull request diesel-rs#3734 from surban/fix-datetimeproxy
Browse files Browse the repository at this point in the history
time: sql_type for DateTimeProxy without backend
  • Loading branch information
weiznich committed Aug 15, 2023
1 parent 0a7babd commit a41f979
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion diesel/src/type_impls/date_and_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,16 @@ mod time {
#[cfg_attr(feature = "mysql_backend", diesel(sql_type = crate::sql_types::Datetime))]
struct NaiveDateTimeProxy(PrimitiveDateTime);

#[derive(AsExpression, FromSqlRow)]
#[derive(FromSqlRow)]
#[diesel(foreign_derive)]
#[cfg_attr(
any(
feature = "postgres_backend",
feature = "sqlite",
feature = "mysql_backend"
),
derive(AsExpression)
)]
#[cfg_attr(
feature = "postgres_backend",
diesel(sql_type = crate::sql_types::Timestamptz)
Expand Down

0 comments on commit a41f979

Please sign in to comment.