pub struct WindowRequest {
pub table_name: String,
pub select: Vec<WindowSelectColumn>,
pub windows: Vec<WindowFunctionRequest>,
pub where_clause: Option<WhereClause>,
pub order_by: Vec<WindowOrderBy>,
pub limit: Option<u32>,
pub offset: Option<u32>,
}Expand description
High-level window query request using semantic field names.
This is the user-facing API that uses measure names and dimension paths
instead of raw SQL expressions. It gets validated and converted to
WindowExecutionPlan by WindowPlanner::plan().
§Example
ⓘ
let request = WindowRequest {
table_name: "tf_sales".to_string(),
select: vec![
WindowSelectColumn::Measure { name: "revenue".to_string(), alias: "revenue".to_string() },
WindowSelectColumn::Dimension { path: "category".to_string(), alias: "category".to_string() },
],
windows: vec![WindowFunctionRequest {
function: WindowFunctionSpec::RunningSum { measure: "revenue".to_string() },
alias: "running_total".to_string(),
partition_by: vec![],
order_by: vec![WindowOrderBy { field: "occurred_at".to_string(), direction: OrderDirection::Asc }],
frame: Some(WindowFrame { ... }),
}],
where_clause: None,
order_by: vec![],
limit: Some(100),
offset: None,
};Fields§
§table_name: StringFact table name (e.g., “tf_sales”)
select: Vec<WindowSelectColumn>Columns to select (measures, dimensions, filters)
windows: Vec<WindowFunctionRequest>Window function specifications
where_clause: Option<WhereClause>WHERE clause filters (applied before window computation)
order_by: Vec<WindowOrderBy>Final ORDER BY (after window computation)
limit: Option<u32>Result limit
offset: Option<u32>Result offset
Trait Implementations§
Source§impl Clone for WindowRequest
impl Clone for WindowRequest
Source§fn clone(&self) -> WindowRequest
fn clone(&self) -> WindowRequest
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 WindowRequest
impl Debug for WindowRequest
Source§impl<'de> Deserialize<'de> for WindowRequest
impl<'de> Deserialize<'de> for WindowRequest
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 WindowRequest
impl PartialEq for WindowRequest
Source§impl Serialize for WindowRequest
impl Serialize for WindowRequest
impl StructuralPartialEq for WindowRequest
Auto Trait Implementations§
impl Freeze for WindowRequest
impl RefUnwindSafe for WindowRequest
impl Send for WindowRequest
impl Sync for WindowRequest
impl Unpin for WindowRequest
impl UnsafeUnpin for WindowRequest
impl UnwindSafe for WindowRequest
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