Functions
and_
fn (filters: Vec<Str>): Str
Combine filters with AND logic (explicit grouping). Takes raw filter expressions.
Example
::f ::supabase::filters
::f/and_(["age.gte.18", "age.lte.65"]) // "and=%28age.gte.18%2Cage.lte.65%29"
cd
fn (col: Str, val: Str): Str
PostgREST cd (contained by) filter.
Example
::supabase::filters/cd("tags", "{a,b,c}") // "tags=cd.%7Ba%2Cb%2Cc%7D"
cs
fn (col: Str, val: Str): Str
PostgREST cs (contains) filter for arrays/ranges.
Example
::supabase::filters/cs("tags", "{a,b}") // "tags=cs.%7Ba%2Cb%7D"
eq
fn (col: Str, val: Any): Str
PostgREST eq filter. eq("status", "active") => "status=eq.active"
Example
::supabase::filters/eq("status", "active") // "status=eq.active"
::supabase::filters/eq("active", true) // "active=eq.true"
filter
fn (col: Str, op: Str, val: Any): Str
Build a filter for any PostgREST operator. Use it for operators without a helper here. The column and value are URL-encoded. The value is sent as it is, with no quoting: PostgREST takes the whole rest of the parameter as the value.
Example
::supabase::filters/filter("deleted_at", "isdistinct", "null") // "deleted_at=isdistinct.null"
fts
fn (col: Str, val: Str): Str
PostgREST full-text search.
Example
::supabase::filters/fts("description", "hot language") // "description=fts.hot%20language"
gt
fn (col: Str, val: Any): Str
PostgREST gt filter (greater than). gt("age", 20) => "age=gt.20"
Example
::supabase::filters/gt("age", 20) // "age=gt.20"
gte
fn (col: Str, val: Any): Str
PostgREST gte filter (greater than or equal). gte("age", 18) =>
"age=gte.18"
Example
::supabase::filters/gte("age", 18) // "age=gte.18"
ilike
fn (col: Str, val: Str): Str
PostgREST ilike filter (case-insensitive pattern). Use * for
wildcards.
Example
::supabase::filters/ilike("name", "*smith") // "name=ilike.%2Asmith"
in_
fn (col: Str, vals: Vec): Str
PostgREST in filter. in_("id", [1, 2, 3]) => "id=in.(1,2,3)"
Example
::f ::supabase::filters
::f/in_("status", ["active", "pending"]) // => "status=in.(active,pending)"
is_
fn (col: Str, val: Str): Str
PostgREST is filter for null/bool checks. is_("deleted", "null") =>
"deleted=is.null". Also: is_("active", "true").
Example
::supabase::filters/is_("deleted", "null") // "deleted=is.null"
::supabase::filters/is_("active", "true") // "active=is.true"
like
fn (col: Str, val: Str): Str
PostgREST like filter (case-sensitive pattern). Use * for wildcards.
Example
::supabase::filters/like("name", "John*") // "name=like.John%2A"
lt
fn (col: Str, val: Any): Str
PostgREST lt filter (less than). lt("age", 13) => "age=lt.13"
Example
::supabase::filters/lt("age", 13) // "age=lt.13"
lte
fn (col: Str, val: Any): Str
PostgREST lte filter (less than or equal). lte("age", 65) =>
"age=lte.65"
Example
::supabase::filters/lte("age", 65) // "age=lte.65"
neq
fn (col: Str, val: Any): Str
PostgREST neq filter (not equal). neq("status", "draft") =>
"status=neq.draft"
Example
::supabase::filters/neq("status", "draft") // "status=neq.draft"
not_
fn (col: Str, op: Str): Str
Negate a filter operator. not_("status", "eq.archived") => "status=not.eq.archived"
Example
::f ::supabase::filters
::f/not_("role", "eq.guest") // => "role=not.eq.guest"
or_
fn (filters: Vec<Str>): Str
Combine filters with OR logic. Takes raw filter expressions (without the column prefix).
Example
::f ::supabase::filters
::f/or_(["age.lt.18", "age.gt.65"]) // "or=%28age.lt.18%2Cage.gt.65%29"
ov
fn (col: Str, val: Str): Str
PostgREST ov (overlap) filter for arrays/ranges.
Example
::supabase::filters/ov("tags", "{a,b}") // "tags=ov.%7Ba%2Cb%7D"