Skip to content

Filter - New Syntax

The new syntax provides a compact, readable way to filter data.

(column,value) # Implicit equality
(column,operator,value) # Explicit operator
OperatorSQL EquivalentDescriptionExample
(none)=Equality (default)(status,ACTIVE)
ne<>Not equal(status,ne,DELETED)
gt>Greater than(price,gt,100)
gte>=Greater than or equal(age,gte,18)
lt<Less than(stock,lt,10)
lte<=Less than or equal(score,lte,100)
hasILIKE '%val%'Contains substring (case-insensitive)(name,has,test)
swILIKE 'val%'Starts with (case-insensitive)(email,sw,admin)
ewILIKE '%val'Ends with (case-insensitive)(file,ew,.pdf)
inIN (...)Matches any value in set(id,in,1|2|3)
nullIS NULLIs null(deletedAt,null)
notnullIS NOT NULLIs not null(createdAt,notnull)

Operators are case-insensitive: GT, Gt, gt all work identically.

FormatDescriptionExampleSQL Output
columnSingle column(status,ACTIVE)"status" = 'ACTIVE'
table.columnTable-qualified column(user.email,sw,admin)"user"."email"::text ILIKE 'admin%'
table.column.jsonFieldJSON field access(user.metadata.role,admin)"user"."metadata"->>'role' = 'admin'
CharacterEscape SequenceExampleResult
, (comma)\,(name,Doe\, John)"name" = 'Doe, John'
| (pipe)|(desc,has,A|B)"desc"::text ILIKE '%A|B%'
\ (backslash)\\(path,sw,C:\\Windows)"path"::text ILIKE E'C:\\\\Windows%'

Spaces do not require escaping:

Filter:

(name,has,John Doe)

SQL:

"name"::text ILIKE '%John Doe%'

Use pipes (|) to separate multiple values:

Example 1 - Filter:

(id,in,1|2|3)

SQL:

"id" IN (1, 2, 3)

Example 2 - Filter:

(status,in,ACTIVE|PENDING|PROCESSING)

SQL:

"status" IN ('ACTIVE', 'PENDING', 'PROCESSING')

Example 3 - Filter:

(status,in,In Progress|On Hold)

SQL:

"status" IN ('In Progress', 'On Hold')

Escape literal pipes within values:

Example 4 - Filter:

(tags,in,red\|green|blue|yellow)

SQL:

"tags" IN ('red|green', 'blue', 'yellow')
OperatorDescriptionExample
andLogical AND(a,1)and(b,2)
orLogical OR(a,1)or(b,2)

Operators are case-insensitive: AND, And, and all work identically.

Example 1 - Filter:

(a,1)and(b,2)and(c,3)

SQL:

"a" = 1 AND "b" = 2 AND "c" = 3

Example 2 - Filter:

(a,1)or(b,2)or(c,3)

SQL:

"a" = 1 OR "b" = 2 OR "c" = 3

Example 3 - Filter:

(a,1)and(b,2)or(c,3)

SQL:

"a" = 1 AND "b" = 2 OR "c" = 3

Prefix expressions with ! to negate:

Example 1 - Filter:

!(status,DELETED)

SQL:

NOT ("status" = 'DELETED')

Example 2 - Filter:

!(a,1)and(b,2)

SQL:

NOT ("a" = 1) AND ("b" = 2)

Example 3 - Filter:

(a,1)and!(b,2)

SQL:

("a" = 1) AND NOT ("b" = 2)

Example 4 - Filter:

!(a,1)and!(b,2)

SQL:

NOT ("a" = 1) AND NOT ("b" = 2)

Use parentheses to control precedence:

Example 1 - Filter:

((a,1)or(b,2))

SQL:

(("a" = 1) OR ("b" = 2))

Example 2 - Filter:

((a,1)or(b,2))and((c,3)or(d,4))

SQL:

(("a" = 1) OR ("b" = 2)) AND (("c" = 3) OR ("d" = 4))

Negate entire groups:

Example 3 - Filter:

!((a,1)or(b,2))

SQL:

NOT (("a" = 1) OR ("b" = 2))

Example 4 - Filter:

((a,1)or(b,2))and!((c,3)or(d,4))

SQL:

(("a" = 1) OR ("b" = 2)) AND NOT (("c" = 3) OR ("d" = 4))

Whitespace is allowed around logical operators and after commas:

Example 1 - Filter:

(a,1) and (b,2)

SQL:

"a" = 1 AND "b" = 2

Example 2 - Filter:

(status, ACTIVE)

SQL:

"status" = 'ACTIVE'

Example 3 - Filter:

(price, gt, 100)

SQL:

"price" > 100

Whitespace within values is preserved:

Example 4 - Filter:

(name,John Doe)

SQL:

"name" = 'John Doe'

Example 5 - Filter:

(title,has,hello world)

SQL:

"title"::text ILIKE '%hello world%'