Function: computeFilterDomain()
computeFilterDomain(
filter):ComputedFilterDomain|undefined
Defined in: filterControls.ts:239
Derives a concrete domain for a filter whose catalog domain is 'runtime',
by scanning the rows the application already holds. Pure — it reads the
rows passed to it and fetches nothing, keeping data access on the
application's side of the line PRD-004 draws.
Values that do not match the filter's kind are skipped rather than
coerced: a numeric column holding '12' as text is a data problem the
catalog should not paper over by silently parsing it.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | { filter: { aliases?: string[]; description?: string; domain: { mode: "runtime"; }; id: string; kind: "temporal" | "categorical" | "numeric"; metricId?: string; multiple?: boolean; operators: ("in" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "not-in")[]; property: string; sensible?: boolean; slug?: string; sourceDatasetId?: string; sourceGeographyId?: string; title: string; }; rows: readonly Record<string, unknown>[]; } | The filter whose domain should be computed. |
filter.filter | { aliases?: string[]; description?: string; domain: { mode: "runtime"; }; id: string; kind: "temporal" | "categorical" | "numeric"; metricId?: string; multiple?: boolean; operators: ("in" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "not-in")[]; property: string; sensible?: boolean; slug?: string; sourceDatasetId?: string; sourceGeographyId?: string; title: string; } | - |
filter.filter.aliases? | string[] | - |
filter.filter.description? | string | - |
filter.filter.domain | { mode: "runtime"; } | - |
filter.filter.domain.mode | "runtime" | - |
filter.filter.id | string | - |
filter.filter.kind | "temporal" | "categorical" | "numeric" | - |
filter.filter.metricId? | string | - |
filter.filter.multiple? | boolean | - |
filter.filter.operators | ("in" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "not-in")[] | - |
filter.filter.property | string | - |
filter.filter.sensible? | boolean | - |
filter.filter.slug? | string | - |
filter.filter.sourceDatasetId? | string | - |
filter.filter.sourceGeographyId? | string | - |
filter.filter.title | string | - |
filter.rows | readonly Record<string, unknown>[] | - |
Returns
ComputedFilterDomain | undefined
The computed domain, or undefined when no row carries a usable value.