Filter-condition helpers — mirror the Go (Eq/Neq/…) and JS (eq/neq/…)
SDKs for parity. In Clojure these are thin sugar over plain maps; you
can always write the literal ({:_eq v}) directly. The combinators
and/or/not are where they earn their keep.
Alias as f and place conditions in a where map keyed by field:
(require '[synthigy.client.filter :as f]) (client/search c :user {:-where {:active (f/eq true) :age (f/gt 18)}} [:name]) (client/search c :user {:-where (f/or {:role (f/eq "admin")} {:role (f/eq "owner")})} [:name])
Filter-condition helpers — mirror the Go (Eq/Neq/…) and JS (eq/neq/…)
SDKs for parity. In Clojure these are thin sugar over plain maps; you
can always write the literal (`{:_eq v}`) directly. The combinators
and/or/not are where they earn their keep.
Alias as `f` and place conditions in a where map keyed by field:
(require '[synthigy.client.filter :as f])
(client/search c :user {:-where {:active (f/eq true)
:age (f/gt 18)}} [:name])
(client/search c :user {:-where (f/or {:role (f/eq "admin")}
{:role (f/eq "owner")})} [:name])cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |