Queries

Filter language

Filters parse into a typed AST before compiling to parameterized SQL.

Grammar

filter  := clause ("&&" clause)*
clause  := field operator json-literal
operator := = | != | > | >= | < | <= | ~

Operators and types

  • = !=: text, numbers, booleans, dates and null.
  • > >= < <=: numbers, text and RFC 3339 dates.
  • ~: bounded substring matching on text-like fields.

Unknown fields, malformed JSON literals and incompatible operators are rejected. Expressions are limited to 512 bytes and eight clauses.