pub struct FrameClause {
pub frame_type: FrameType,
pub start: Frame,
pub end: Option<Frame>,
}Expand description
Frame clause for window functions.
Defines the frame boundaries for a window function.
§Examples
use reinhardt_query::types::{FrameClause, FrameType, Frame};
// ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
let frame = FrameClause {
frame_type: FrameType::Rows,
start: Frame::UnboundedPreceding,
end: Some(Frame::CurrentRow),
};
// RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING
let frame2 = FrameClause {
frame_type: FrameType::Range,
start: Frame::Preceding(1),
end: Some(Frame::Following(1)),
};Fields§
§frame_type: FrameTypeFrame type (RANGE, ROWS, or GROUPS).
start: FrameStart boundary of the frame.
end: Option<Frame>End boundary of the frame (if None, only start is specified).
Trait Implementations§
Source§impl Clone for FrameClause
impl Clone for FrameClause
Source§fn clone(&self) -> FrameClause
fn clone(&self) -> FrameClause
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FrameClause
impl RefUnwindSafe for FrameClause
impl Send for FrameClause
impl Sync for FrameClause
impl Unpin for FrameClause
impl UnsafeUnpin for FrameClause
impl UnwindSafe for FrameClause
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