pub struct BranchPlan {
pub partial_leading: Option<(NaiveDate, NaiveDate)>,
pub complete_middle: Option<(NaiveDate, NaiveDate)>,
pub current_period: (NaiveDate, NaiveDate),
}Expand description
Plan describing which UNION ALL branches to generate.
A partial-period UNION ALL query has up to 3 branches:
partial_leading: fine-grain rows from the non-aligned lower bound to the next period boundary (omitted when the lower bound is period-aligned).complete_middle: coarse-grain rows for fully completed periods between the leading partial period and the current period (omitted when there are no complete periods in range).current_period: fine-grain rows for the in-progress period up to today (always present).
Date ranges are half-open intervals: [gte, lt).
Fields§
§partial_leading: Option<(NaiveDate, NaiveDate)>Partial leading period: [gte, lt). None when the lower bound is period-aligned.
complete_middle: Option<(NaiveDate, NaiveDate)>Complete middle periods: [gte, lt). None when no complete periods exist.
current_period: (NaiveDate, NaiveDate)Current in-progress period: [gte, lt). Always present.
Trait Implementations§
Source§impl Clone for BranchPlan
impl Clone for BranchPlan
Source§fn clone(&self) -> BranchPlan
fn clone(&self) -> BranchPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BranchPlan
impl Debug for BranchPlan
impl Eq for BranchPlan
Source§impl PartialEq for BranchPlan
impl PartialEq for BranchPlan
Source§fn eq(&self, other: &BranchPlan) -> bool
fn eq(&self, other: &BranchPlan) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BranchPlan
Auto Trait Implementations§
impl Freeze for BranchPlan
impl RefUnwindSafe for BranchPlan
impl Send for BranchPlan
impl Sync for BranchPlan
impl Unpin for BranchPlan
impl UnsafeUnpin for BranchPlan
impl UnwindSafe for BranchPlan
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.