Liking cljdoc? Tell your friends :D

supabase.postgrest.filters

Filter builders for PostgREST queries.

Every fn takes a request map (from supabase.postgrest/from) and returns it with a query-string filter appended.

Composite filters

all-of / any-of accept a nested vector DSL:

[[:gt "age" 18]
 [:eq "status" "active"]
 [:and [[:lt "salary" 5000]
        [:eq "role" "junior"]]]
 [:not [:eq "deleted" true]]]
Filter builders for PostgREST queries.

Every fn takes a request map (from `supabase.postgrest/from`) and
returns it with a query-string filter appended.

## Composite filters

`all-of` / `any-of` accept a nested vector DSL:

    [[:gt "age" 18]
     [:eq "status" "active"]
     [:and [[:lt "salary" 5000]
            [:eq "role" "junior"]]]
     [:not [:eq "deleted" true]]]
raw docstring

all-ofclj

(all-of req patterns)
(all-of req patterns opts)

AND-combines patterns. Accepts a raw string or a vector of DSL conditions. Optional :foreign-table scopes to a related table.

AND-combines `patterns`. Accepts a raw string or a vector of DSL
conditions. Optional `:foreign-table` scopes to a related table.
sourceraw docstring

any-ofclj

(any-of req patterns)
(any-of req patterns opts)

OR-combines patterns. Accepts a raw string or a vector of DSL conditions. Optional :foreign-table scopes to a related table.

OR-combines `patterns`. Accepts a raw string or a vector of DSL
conditions. Optional `:foreign-table` scopes to a related table.
sourceraw docstring

contained-byclj

(contained-by req column value)

Match rows where every element of column is contained by value.

Match rows where every element of `column` is contained by `value`.
sourceraw docstring

containsclj

(contains req column value)

Match rows where column contains every element in value.

Match rows where `column` contains every element in `value`.
sourceraw docstring

eqclj

source

filterclj

(filter req column op value)

Escape hatch — apply a raw PostgREST operator. column, op, and value are NOT escaped; sanitize them yourself.

Escape hatch — apply a raw PostgREST operator. `column`, `op`, and
`value` are NOT escaped; sanitize them yourself.
sourceraw docstring

gtclj

source

gteclj

source

ilikeclj

source

ilike-all-ofclj

source

ilike-any-ofclj

source

isclj

(is req column value)

Match rows where column IS value (typically nil or a boolean).

Match rows where `column` IS `value` (typically nil or a boolean).
sourceraw docstring

likeclj

source

like-all-ofclj

source

like-any-ofclj

source

ltclj

source

lteclj

source

matchclj

(match req query-map)

Shorthand for multiple eq filters from a map of column => value.

Shorthand for multiple `eq` filters from a map of `column => value`.
sourceraw docstring

negateclj

(negate req column op value)

NOT(op).value on column.

NOT(op).value on `column`.
sourceraw docstring

neqclj

source

overlapsclj

(overlaps req column value)

Match rows where column and value share at least one element.

Match rows where `column` and `value` share at least one element.
sourceraw docstring

process-conditionclj

(process-condition cond-form)

Recursively encodes a DSL condition to its PostgREST string form.

Recursively encodes a DSL condition to its PostgREST string form.
sourceraw docstring

range-adjacentclj

source

range-gtclj

source

range-gteclj

source

range-ltclj

source

range-lteclj

source

(text-search req column query)
(text-search req column query opts)

Full-text search on column for query.

Opts: :type — :plain | :phrase | :websearch :config — text-search config name (e.g. "english")

Full-text search on `column` for `query`.

Opts:
  :type   — :plain | :phrase | :websearch
  :config — text-search config name (e.g. "english")
sourceraw docstring

withinclj

(within req column values)

PostgREST IN filter. Renamed from in to avoid shadowing tools and to keep symmetry with clojure.core naming.

PostgREST `IN` filter. Renamed from `in` to avoid shadowing tools and
to keep symmetry with `clojure.core` naming.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close