pub struct Window {
pub func: WindowFunc,
pub partition_by: Vec<Expr>,
pub order_by: Vec<OrderExpr>,
}Expand description
A window function with its PARTITION BY and ORDER BY.
Fields§
§func: WindowFuncFunction.
partition_by: Vec<Expr>PARTITION BY expressions.
order_by: Vec<OrderExpr>ORDER BY terms inside the window.
Implementations§
Source§impl Window
impl Window
Sourcepub fn over(func: WindowFunc) -> Self
pub fn over(func: WindowFunc) -> Self
Window evaluating func over the whole result (no partition or ordering yet).
Sourcepub fn partition_by<E: Into<Expr>>(
self,
exprs: impl IntoIterator<Item = E>,
) -> Self
pub fn partition_by<E: Into<Expr>>( self, exprs: impl IntoIterator<Item = E>, ) -> Self
Restart the function for every distinct value of exprs.
Sourcepub fn order_by(self, terms: impl IntoIterator<Item = OrderExpr>) -> Self
pub fn order_by(self, terms: impl IntoIterator<Item = OrderExpr>) -> Self
Order rows inside each partition.
Trait Implementations§
impl StructuralPartialEq for Window
Auto Trait Implementations§
impl Freeze for Window
impl RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl UnsafeUnpin for Window
impl UnwindSafe for Window
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