Lists
List Membership
Section titled “List Membership”Use in to check if a value is in a list, and not in to check it is not:
status in [200, 201, 204]env not in ['prod', 'staging']Syntax Rules
Section titled “Syntax Rules”- Values are enclosed in square brackets
[ ]and separated by commas - All values in a list must be the same type (all strings or all numbers)
- String values must be quoted:
['a', 'b', 'c'] - Numeric values are unquoted:
[1, 2, 3] - Spaces around commas and brackets are allowed
String Lists
Section titled “String Lists”method in ['GET', 'POST', 'PUT']env not in ['dev', 'test', 'local']Both single and double quotes work for string values.
Numeric Lists
Section titled “Numeric Lists”status in [200, 201, 204]port not in [80, 443]Empty Lists
Section titled “Empty Lists”Empty lists are allowed:
status in [] # always false — nothing matches an empty liststatus not in [] # always true — everything is "not in" an empty listType Consistency
Section titled “Type Consistency”Lists must contain values of a uniform type — all strings or all numbers. Mixing types within a single list causes a parse error:
# Valid — all numbersstatus in [200, 201, 204]
# Valid — all stringsenv in ['prod', 'staging']
# Invalid — mixed types (parse error)values in [200, 'ok']The parser tracks the type of the first value in the list and rejects any subsequent value of a different type. This is enforced at parse time, before the query reaches any generator or matcher.
When a SQL generator processes a list, it additionally validates that the list value types are compatible with the target column type. For example, passing string values to a numeric column will raise a validation error during SQL generation.
The valuesType field on the parsed expression indicates whether the list contains "string" or "number" values. For empty lists, valuesType is null.
Combined with Other Operators
Section titled “Combined with Other Operators”List operators combine with boolean operators like any other condition:
status in [200, 201] and method in ['GET', 'POST']level=error or status not in [200, 201, 204](status in [500, 502, 503] or level=critical) and env=prodExamples
Section titled “Examples”# HTTP success codesstatus in [200, 201, 204]
# Exclude test environmentsenv not in ['dev', 'test', 'staging']
# Multiple list conditionsmethod in ['GET', 'POST'] and status not in [401, 403, 404]