ExpressionKind

View as Markdown

Evaluation strategy of an AdapTableQL Expression, inferred from its text:

  • scalar — evaluated per row (e.g. [price] > 100, [qty] * [price])
  • aggregated — evaluated over a set of rows (e.g. SUM{[notional]} > 1000000, AVG{[price], GROUP_BY([sector])})

Live (observable) functions (CHANGE_COUNT{[price], WITHIN(5m)} >= 3, ROW_AGE{}) read the row's own change history and are scalar.

Kind is a property of the syntax: NAME(...) is a per-row function call, NAME{...} is a set call. State objects therefore store expressions as plain strings and AdapTable infers the kind.

TypeScript
export type ExpressionKind = 'scalar' | 'aggregated';