Struct diesel::pg::data_types::PgInterval [−][src]
Expand description
Intervals in Postgres are separated into 3 parts. A 64 bit integer representing time in microseconds, a 32 bit integer representing number of days, and a 32 bit integer representing number of months. This struct is a dumb wrapper type, meant only to indicate the meaning of these parts.
Fields
microseconds: i64
The number of whole microseconds
days: i32
The number of whole days
months: i32
The number of whole months
Implementations
Constructs a new PgInterval
No conversion occurs on the arguments. It is valid to provide a number of microseconds greater than the longest possible day, or a number of days greater than the longest possible month, as it is impossible to say how many months are in “40 days” without knowing a precise date.
Equivalent to new(microseconds, 0, 0)
Equivalent to new(0, 0, months)
Trait Implementations
type Output = PgInterval
type Output = PgInterval
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Expression = Bound<Interval, Self>
type Expression = Bound<Interval, Self>
The expression being returned
Perform the conversion
type Expression = Bound<Interval, Self>
type Expression = Bound<Interval, Self>
The expression being returned
Perform the conversion
type Expression = Bound<Nullable<Interval>, Self>
type Expression = Bound<Nullable<Interval>, Self>
The expression being returned
Perform the conversion
type Expression = Bound<Nullable<Interval>, Self>
type Expression = Bound<Nullable<Interval>, Self>
The expression being returned
Perform the conversion
impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgInterval where
__DB: Backend,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> FromSqlRow<__ST, __DB> for PgInterval where
__DB: Backend,
Self: FromSql<__ST, __DB>,
See the trait documentation.
The number of fields that this type will consume. Must be equal to
the number of times you would call row.take()
in build_from_row
Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<__ST, __DB> Queryable<__ST, __DB> for PgInterval where
__DB: Backend,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> Queryable<__ST, __DB> for PgInterval where
__DB: Backend,
Self: FromSql<__ST, __DB>,
Auto Trait Implementations
impl RefUnwindSafe for PgInterval
impl Send for PgInterval
impl Sync for PgInterval
impl Unpin for PgInterval
impl UnwindSafe for PgInterval
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert self
to an expression for Diesel’s query builder. Read more