Skip to content

Commit

Permalink
Merge pull request #4051 from McDic/feature/interval-docs
Browse files Browse the repository at this point in the history
Improve docstring of `Interval` type
  • Loading branch information
weiznich authored May 29, 2024
2 parents db6730c + 792a6aa commit 48a8971
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions diesel/src/sql_types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,13 @@ pub struct Date;
///
/// - [`PgInterval`] which can be constructed using [`IntervalDsl`]
/// - [`chrono::Duration`][Duration] with `feature = "chrono"`
/// (There might be some information loss due to special behavior for literal `month` (or longer) intervals;
/// Please read official documentation of [PostgreSQL Interval].)
///
/// [`PgInterval`]: ../pg/data_types/struct.PgInterval.html
/// [`IntervalDsl`]: ../pg/expression/extensions/trait.IntervalDsl.html
/// [Duration]: https://docs.rs/chrono/*/chrono/type.Duration.html
/// [PostgreSQL Interval]: https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-INTERVAL-INPUT
#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
#[diesel(postgres_type(oid = 1186, array_oid = 1187))]
pub struct Interval;
Expand Down

0 comments on commit 48a8971

Please sign in to comment.