Skip to main content

Module windows

Module windows 

Source
Expand description

Window columns are ordered, partitioned rolling computations over the rows of a crate::Table, declared per-crate::View like expression columns - the analogue of SQL window functions. Each WindowSpec produces a new output column, named by its key in the windows map ({"name": {...spec}}, symmetric with expressions), which may be used anywhere a Table column can: columns, filter, sort, group_by, etc. Window columns update incrementally as the Table updates, including rows outside an update batch whose window frames were affected by it.

Structs§

WindowSort
The Table column which orders each partition, with its direction - serialized as a two-element array (["ts", "desc"]), symmetric with the ViewConfig’s sort field.
WindowSpec
A declaration of a single window column, named by its key in Windows. See the module docs for the computation model.
Windows
The window columns of a ViewConfig, keyed by output column alias - symmetric with expressions ({"name": {...spec}}). An alias must not collide with a Table column, expression alias, or another window’s key.

Enums§

WindowAggregate
WindowFrame
WindowSortDir
A window’s order direction. A dedicated two-variant enum rather than crate::config::SortDir - the column-sort extras (col asc, abs, none) are meaningless inside a window frame and unrepresentable here.