Comparison Operators
FlyQL supports the following comparison operators:
Equality
Section titled “Equality”| Operator | Name | Example |
|---|---|---|
= | Equals | status=200 |
!= | Not equals | env!=prod |
status=200service!="api-gateway"Both sides of the operator are required — a key and a value.
Numeric Comparison
Section titled “Numeric Comparison”| Operator | Name | Example |
|---|---|---|
> | Greater than | status>399 |
>= | Greater or equals | status>=400 |
< | Less than | duration<1000 |
<= | Less or equals | duration<=500 |
status>=400 and duration<5000response_time>100 and response_time<=2000Numeric comparison operators work on numeric values. When used with string values, lexicographic comparison applies.
Regex Matching
Section titled “Regex Matching”| Operator | Name | Example |
|---|---|---|
~ | Regex match | message~"error.*" |
!~ | Not regex match | path!~"^/health" |
message~"timeout|connection refused"host!~"^test-.*"Regex patterns follow the syntax of the target database or runtime.
List Membership
Section titled “List Membership”| Operator | Name | Example |
|---|---|---|
in | In list | status in [200, 201] |
not in | Not in list | env not in ['dev', 'test'] |
See the Lists page for detailed list syntax rules.
Containment Check
Section titled “Containment Check”| Operator | Name | Example |
|---|---|---|
has | Contains | message has 'error' |
not has | Does not contain | message not has 'test' |
message has 'timeout'tags not has 'deprecated'The has operator performs a type-dependent containment check:
- String — substring match:
message has 'error'is true ifmessagecontains"error" - Map — key existence:
metadata has 'region'is true if the map has a key"region" - Array/List — item membership:
tags has 'web'is true if the array contains"web" - JSON — key existence:
data has 'name'is true if the JSON object has a key"name" - Null/empty — always false for
has, always true fornot has
has takes a single value (not a list). Use in for checking membership in a set of values.
Operator Summary
Section titled “Operator Summary”| Operator | Name | Example |
|---|---|---|
= | Equals | status=200 |
!= | Not equals | env!=prod |
> | Greater than | count>10 |
>= | Greater or equals | count>=10 |
< | Less than | count<100 |
<= | Less or equals | count<=100 |
~ | Regex match | msg~"err.*" |
!~ | Not regex match | msg!~"^ok" |
in | In list | s in [1, 2] |
not in | Not in list | s not in [3] |
has | Contains | msg has 'err' |
not has | Not contains | msg not has 'ok' |