Expand description
Rich per-column filter model plus the pure matching pipeline.
A ColumnFilter combines two independent, AND-composed mechanisms that
mirror the Numbers-style filter popover:
- an optional operator predicate (the “Choose One” rule) — a text “like” operation (contains / begins with / regex …) for string columns, or a numeric/date comparison (greater than / between …) for numeric and date columns; and
- an optional value set (the searchable checkbox list) — the exact set of formatted values that are allowed through.
Either half is inert when unset (FilterPredicate::None and
values == None respectively), so an empty ColumnFilter passes every
row. This module is intentionally GPUI-free: it operates on
CellValue/ResolvedColumnFormat and is reusable from exports, tests,
and server-side previews.
Structs§
- Column
Filter - A single column’s committed filter: an optional operator predicate ANDed with an optional allow-list of formatted values.
Enums§
- Filter
Predicate - The operator-rule half of a
ColumnFilter. - Number
Op - Numeric / date comparison operators offered for
ColumnKind::Integer,ColumnKind::Decimal, andColumnKind::Datecolumns. - TextOp
- Text (“like”) operators offered for string-like columns
(
ColumnKind::Text,ColumnKind::Boolean,ColumnKind::None).
Functions§
- cell_
passes_ filter - Evaluate a cell against a column filter. Empty/inert filters pass.
- parse_
ymd_ to_ unix - Parse a
YYYY-MM-DDcalendar date into Unix seconds (UTC midnight). ReturnsNonefor malformed input. Used to interpret date operands typed into the filter panel’s range fields. - uses_
number_ ops truewhen a column ofkinduses numeric/date operators rather than the text “like” operator set.