Skip to content

Comparison Operators

FlyQL supports the following comparison operators:

OperatorNameExample
=Equalsstatus=200
!=Not equalsenv!=prod
status=200
service!="api-gateway"

Both sides of the operator are required — a key and a value.

OperatorNameExample
>Greater thanstatus>399
>=Greater or equalsstatus>=400
<Less thanduration<1000
<=Less or equalsduration<=500
status>=400 and duration<5000
response_time>100 and response_time<=2000

Numeric comparison operators work on numeric values. When used with string values, lexicographic comparison applies.

OperatorNameExample
~Regex matchmessage~"error.*"
!~Not regex matchpath!~"^/health"
message~"timeout|connection refused"
host!~"^test-.*"

Regex patterns follow the syntax of the target database or runtime.

OperatorNameExample
inIn liststatus in [200, 201]
not inNot in listenv not in ['dev', 'test']

See the Lists page for detailed list syntax rules.

OperatorNameExample
hasContainsmessage has 'error'
not hasDoes not containmessage 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 if message contains "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 for not has

has takes a single value (not a list). Use in for checking membership in a set of values.

OperatorNameExample
=Equalsstatus=200
!=Not equalsenv!=prod
>Greater thancount>10
>=Greater or equalscount>=10
<Less thancount<100
<=Less or equalscount<=100
~Regex matchmsg~"err.*"
!~Not regex matchmsg!~"^ok"
inIn lists in [1, 2]
not inNot in lists not in [3]
hasContainsmsg has 'err'
not hasNot containsmsg not has 'ok'