pub struct WindowStatement {
pub partition_by: Vec<SimpleExpr>,
pub order_by: Vec<OrderExpr>,
pub frame: Option<FrameClause>,
}Expand description
Window specification for window functions.
Defines a complete window specification including:
PARTITION BYclauseORDER BYclause- Frame clause (optional)
§Examples
use reinhardt_query::{
types::{WindowStatement, FrameClause, FrameType, Frame, OrderExpr, Order},
expr::Expr,
};
// PARTITION BY department_id ORDER BY salary DESC
let window = WindowStatement {
partition_by: vec![Expr::col("department_id").into_simple_expr()],
order_by: vec![],
frame: None,
};Fields§
§partition_by: Vec<SimpleExpr>PARTITION BY expressions.
order_by: Vec<OrderExpr>ORDER BY expressions.
frame: Option<FrameClause>Optional frame clause.
Implementations§
Trait Implementations§
Source§impl Clone for WindowStatement
impl Clone for WindowStatement
Source§fn clone(&self) -> WindowStatement
fn clone(&self) -> WindowStatement
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 moreSource§impl Debug for WindowStatement
impl Debug for WindowStatement
Auto Trait Implementations§
impl Freeze for WindowStatement
impl !RefUnwindSafe for WindowStatement
impl !Send for WindowStatement
impl !Sync for WindowStatement
impl Unpin for WindowStatement
impl UnsafeUnpin for WindowStatement
impl !UnwindSafe for WindowStatement
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