pub enum DatePart {
Year,
Month,
Day,
Week,
Quarter,
Hour,
Minute,
Second,
Date,
}Expand description
Component extracted by Expr::date_part.
Week is the ISO 8601 week number on every backend. On SQLite the source
must use the canonical text forms documented in crate::types; on
PostgreSQL timestamps are read in UTC.
Variants§
Year
Calendar year.
Month
Month 1..=12.
Day
Day of month.
Week
ISO 8601 week 1..=53.
Quarter
Quarter 1..=4.
Hour
Hour 0..=23.
Minute
Minute 0..=59.
Second
Second 0..=59 (fractions are dropped).
Date
The date, truncating a timestamp.
Trait Implementations§
impl Copy for DatePart
impl Eq for DatePart
impl StructuralPartialEq for DatePart
Auto Trait Implementations§
impl Freeze for DatePart
impl RefUnwindSafe for DatePart
impl Send for DatePart
impl Sync for DatePart
impl Unpin for DatePart
impl UnsafeUnpin for DatePart
impl UnwindSafe for DatePart
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.