Struct sqlx_core::postgres::types::PgInterval [−][src]
Fields
months: i32
days: i32
microseconds: i64
Trait Implementations
Decode a new value of this type using a raw value from the database.
Writes the value of self
into buf
without moving self
. Read more
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull where
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull where
Self: Sized,
Writes the value of self
into buf
in the expected format for the database.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Convert a std::time::Duration
to a PgInterval
This returns an error if there is a loss of precision using nanoseconds or if there is a microsecond overflow.
type Error = BoxDynError
type Error = BoxDynError
The type returned in the event of a conversion error.
Convert a chrono::Duration
to a PgInterval
.
This returns an error if there is a loss of precision using nanoseconds or if there is a nanosecond overflow.
type Error = BoxDynError
type Error = BoxDynError
The type returned in the event of a conversion error.
Convert a time::Duration
to a PgInterval
.
This returns an error if there is a loss of precision using nanoseconds or if there is a microsecond overflow.
type Error = BoxDynError
type Error = BoxDynError
The type returned in the event of a conversion error.
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
Compare self to key
and return true
if they are equal.