Skip to content

Filter Operators

Complete reference for query filter operators.

Comparison Operators

eq - Equal

json
{
  "column": "status",
  "operator": "eq",
  "value": "active"
}

SQL: status = 'active'

neq - Not Equal

json
{
  "column": "status",
  "operator": "neq",
  "value": "deleted"
}

SQL: status != 'deleted'

gt - Greater Than

json
{
  "column": "age",
  "operator": "gt",
  "value": 18
}

SQL: age > 18

gte - Greater Than or Equal

json
{
  "column": "price",
  "operator": "gte",
  "value": 100
}

SQL: price >= 100

lt - Less Than

json
{
  "column": "stock",
  "operator": "lt",
  "value": 10
}

SQL: stock < 10

lte - Less Than or Equal

json
{
  "column": "rating",
  "operator": "lte",
  "value": 5
}

SQL: rating <= 5

Pattern Matching

like - Pattern Match (Case Sensitive)

json
{
  "column": "name",
  "operator": "like",
  "value": "%John%"
}

SQL: name LIKE '%John%'

ilike - Pattern Match (Case Insensitive)

json
{
  "column": "email",
  "operator": "ilike",
  "value": "%@gmail.com"
}

SQL: email ILIKE '%@gmail.com'

Null Checks

is - IS NULL / IS NOT NULL

json
{
  "column": "deleted_at",
  "operator": "is",
  "value": null
}

SQL: deleted_at IS NULL

Array Operators

in - In Array

json
{
  "column": "status",
  "operator": "in",
  "value": ["active", "pending", "review"]
}

SQL: status IN ('active', 'pending', 'review')

contains - Array Contains

json
{
  "column": "tags",
  "operator": "contains",
  "value": ["tech", "news"]
}

SQL: tags @> ARRAY['tech', 'news']

overlaps - Array Overlaps

json
{
  "column": "categories",
  "operator": "overlaps",
  "value": ["sports", "entertainment"]
}

SQL: categories && ARRAY['sports', 'entertainment']

Dynamic Values

Use templates for dynamic filter values:

json
{
  "column": "user_id",
  "operator": "eq",
  "value": "&#123;&#123;auth.sub&#125;&#125;"
}
json
{
  "column": "id",
  "operator": "eq",
  "value": "&#123;&#123;params.id&#125;&#125;"
}
json
{
  "column": "name",
  "operator": "ilike",
  "value": "%&#123;&#123;query.search&#125;&#125;%"
}

Combining Filters

Multiple filters are combined with AND:

json
{
  "filters": [
    { "column": "status", "operator": "eq", "value": "active" },
    { "column": "created_at", "operator": "gte", "value": "2024-01-01" },
    { "column": "category", "operator": "in", "value": ["tech", "science"] }
  ]
}

SQL: status = 'active' AND created_at >= '2024-01-01' AND category IN ('tech', 'science')

Operator Reference

OperatorDescriptionValue Type
eqEqualany
neqNot equalany
gtGreater thannumber, date
gteGreater or equalnumber, date
ltLess thannumber, date
lteLess or equalnumber, date
likePattern matchstring
ilikeCase-insensitive patternstring
isIS NULL checknull
inIn arrayarray
containsArray containsarray
overlapsArray overlapsarray

Released under the ISC License.