Skip to content

buildFilter

buildFilter<Desc>(schema, query, opts?): CheckedExpr

Defined in: filter.ts:75

Build a type-checked AIP-160 filter expression from a filter string or partial resource object.

Pipeline:

  1. Convert partial resource → filter string (if needed)
  2. parse()ParsedExpr
  3. check() with contextDecls(schema) + extra decls → CheckedExpr
  4. optimize() with inline() to remap column names (if columnMap provided)

The returned CheckedExpr is passed to the engine, which applies its own dialect to translate it into a database-specific query.

Desc extends DescMessage

Desc

string | Partial<MessageShape<Desc>>

BuildFilterOptions

CheckedExpr