pub struct WindowFunction { /* private fields */ }Expand description
窗口函数表达式(函数 + 可选操作数)。
排名函数无操作数;COUNT(*) 用 Self::count_all 表达;其余聚合/取值函数
必须提供列参数,构造器已强制。
Implementations§
Source§impl WindowFunction
impl WindowFunction
Sourcepub fn row_number() -> Self
pub fn row_number() -> Self
ROW_NUMBER()。
Sourcepub fn dense_rank() -> Self
pub fn dense_rank() -> Self
DENSE_RANK()。
Sourcepub fn filter(self, condition: Condition) -> Self
pub fn filter(self, condition: Condition) -> Self
为聚合窗口函数追加 FILTER (WHERE <condition>)。
PostgreSQL 只允许聚合函数使用 FILTER;排名/取值函数(ROW_NUMBER、
RANK、DENSE_RANK、LAG、LEAD)在渲染期返回
crate::error::DbError::InvalidArgument。
Trait Implementations§
Source§impl Clone for WindowFunction
impl Clone for WindowFunction
Auto Trait Implementations§
impl Forget for WindowFunction
impl Freeze for WindowFunction
impl Move for WindowFunction
impl RefUnwindSafe for WindowFunction
impl Send for WindowFunction
impl Sync for WindowFunction
impl Unpin for WindowFunction
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more