pub struct WindowFunction {
pub function: WindowFn,
pub over: WindowSpec,
pub alias: Option<String>,
}Expand description
A window function with its OVER clause.
Fields§
§function: WindowFnThe function being called.
over: WindowSpecThe OVER clause specification.
alias: Option<String>Optional alias for the result.
Implementations§
Source§impl WindowFunction
impl WindowFunction
Sourcepub fn new(function: WindowFn) -> WindowFunctionBuilder
pub fn new(function: WindowFn) -> WindowFunctionBuilder
Create a new window function.
Sourcepub fn over(self, spec: WindowSpec) -> Self
pub fn over(self, spec: WindowSpec) -> Self
Set the OVER clause.
Sourcepub fn to_sql(&self, db_type: DatabaseType) -> String
pub fn to_sql(&self, db_type: DatabaseType) -> String
Generate the full SQL expression.
Trait Implementations§
Source§impl Clone for WindowFunction
impl Clone for WindowFunction
Source§fn clone(&self) -> WindowFunction
fn clone(&self) -> WindowFunction
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 WindowFunction
impl Debug for WindowFunction
Source§impl<'de> Deserialize<'de> for WindowFunction
impl<'de> Deserialize<'de> for WindowFunction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WindowFunction
impl PartialEq for WindowFunction
Source§impl Serialize for WindowFunction
impl Serialize for WindowFunction
impl StructuralPartialEq for WindowFunction
Auto Trait Implementations§
impl Freeze for WindowFunction
impl RefUnwindSafe for WindowFunction
impl Send for WindowFunction
impl Sync for WindowFunction
impl Unpin for WindowFunction
impl UnwindSafe for WindowFunction
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