Expand description
Filter expression grammar for --filter.
Three operators are accepted, deliberately kept small so an agent can emit them without a parser of its own:
| Form | Meaning |
|---|---|
key=value | scalar at key equals value (case sensitive) |
key!=value | scalar at key differs from value |
key~substring | scalar at key contains substring (case folded) |
== is accepted as a synonym of = for parity with sibling CLIs. key
may be a dotted path (stats.total) to reach a nested scalar. Repeating
--filter conjoins the predicates with a logical AND.
Parsing is fail-fast: a malformed expression is rejected before any work is done, so a typo can never be mistaken for “no rows matched”.
Structs§
- Filter
Expr - One parsed
--filterpredicate.
Enums§
- Filter
Op - Comparison performed by a single
FilterExpr.
Functions§
- lookup
- Walks a dotted path inside
value. - matches_
all - Returns
truewhen every predicate acceptselement. - resolve
- Walks a dotted path given as one unsplit string.
- scalar_
text - Renders a JSON scalar as the text used for comparison and dedup keys.