Operators & variants
Constants live in Go (operators.go) and TypeScript (config/data-table.ts). Keep them identical.
Filter variants
| Variant | UI control | Typical operators |
|---|---|---|
text | Debounced input | iLike, notILike, eq, ne, empty |
number | Number input | eq, ne, lt, lte, gt, gte, isBetween |
range | Range / dual input | isBetween, comparisons |
date | Date picker | eq, comparisons, relative |
dateRange | Range picker | isBetween |
boolean | Toggle / select | eq, ne |
select | Faceted single | eq, ne, inArray, empty |
multiSelect | Faceted multi | inArray, notInArray, empty |
Operators
| Operator | SQL idea |
|---|---|
iLike / notILike | Accent-insensitive LIKE / NOT LIKE (unaccent) |
eq / ne | = / <> (text often remapped to iLike) |
inArray / notInArray | IN / NOT IN (JSONB special-cases for roles / IsJSON) |
isEmpty / isNotEmpty | NULL / blank checks (expression-aware) |
lt lte gt gte | Comparisons |
isBetween | Inclusive range (dates may use to_timestamp for epoch ms) |
isRelativeToToday | Relative date windows |
Join operators
and(default)or
Per-filter joinOperator combines left-to-right; global joinOperator is the fallback. Nested groups are parenthesized.
Inference rules (Go)
- Unary ops (
isEmpty,isNotEmpty, …) need no values. - Missing operator + 1 value →
eq(text →iLike). - Missing operator + N values →
inArray. dateRange+ 2 values →isBetween.
PostgreSQL note
Text filters use:
unaccent(lower(column)) LIKE unaccent(lower(?))
Install the extension before shipping text search in production.