Skip to main content

Operators & variants

Constants live in Go (operators.go) and TypeScript (config/data-table.ts). Keep them identical.

Filter variants​

VariantUI controlTypical operators
textDebounced inputiLike, notILike, eq, ne, empty
numberNumber inputeq, ne, lt, lte, gt, gte, isBetween
rangeRange / dual inputisBetween, comparisons
dateDate pickereq, comparisons, relative
dateRangeRange pickerisBetween
booleanToggle / selecteq, ne
selectFaceted singleeq, ne, inArray, empty
multiSelectFaceted multiinArray, notInArray, empty

Operators​

OperatorSQL idea
iLike / notILikeAccent-insensitive LIKE / NOT LIKE (unaccent)
eq / ne= / <> (text often remapped to iLike)
inArray / notInArrayIN / NOT IN (JSONB special-cases for roles / IsJSON)
isEmpty / isNotEmptyNULL / blank checks (expression-aware)
lt lte gt gteComparisons
isBetweenInclusive range (dates may use to_timestamp for epoch ms)
isRelativeToTodayRelative 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)​

  1. Unary ops (isEmpty, isNotEmpty, …) need no values.
  2. Missing operator + 1 value → eq (text → iLike).
  3. Missing operator + N values → inArray.
  4. dateRange + 2 values → isBetween.

PostgreSQL note​

Text filters use:

unaccent(lower(column)) LIKE unaccent(lower(?))

Install the extension before shipping text search in production.