Skip to content

Commit

Permalink
Merge pull request #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 authored Aug 7, 2023
2 parents 69ea89c + feff673 commit cceb170
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 cceb170

Please sign in to comment.