pub struct WindowSpec { /* private fields */ }Expand description
窗口定义:PARTITION BY / ORDER BY / 帧。
全部字段通过 crate::FieldRef 受控构造,渲染时逐段加引号。
Implementations§
Source§impl WindowSpec
impl WindowSpec
Sourcepub fn reference(name: &str) -> Self
pub fn reference(name: &str) -> Self
引用 QueryBuilder::window 定义的命名窗口:OVER "name"。
不能与 PARTITION BY / ORDER BY / 帧组合,渲染期会校验。
Sourcepub fn partition_by(self, fields: &[&FieldRef]) -> Self
pub fn partition_by(self, fields: &[&FieldRef]) -> Self
追加 PARTITION BY 字段。
Sourcepub fn frame(self, frame: WindowFrame) -> Self
pub fn frame(self, frame: WindowFrame) -> Self
设置窗口帧(ROWS / RANGE BETWEEN)。
Trait Implementations§
Source§impl Clone for WindowSpec
impl Clone for WindowSpec
Source§impl Debug for WindowSpec
impl Debug for WindowSpec
Source§impl Default for WindowSpec
impl Default for WindowSpec
impl Eq for WindowSpec
Source§impl PartialEq for WindowSpec
impl PartialEq for WindowSpec
impl StructuralPartialEq for WindowSpec
Auto Trait Implementations§
impl Forget for WindowSpec
impl Freeze for WindowSpec
impl Move for WindowSpec
impl RefUnwindSafe for WindowSpec
impl Send for WindowSpec
impl Sync for WindowSpec
impl Unpin for WindowSpec
impl UnsafeUnpin for WindowSpec
impl UnwindSafe for WindowSpec
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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