(all-attrs fschm f)finds all attributes satisfying f in a schema
(all-attrs {:account/number [{:ident :account/number :type :long}] :account/date [{:ident :account/date :type :instant}]} (fn [attr] (= (:type attr) :long))) => {:account/number [{:type :long, :ident :account/number}]}
finds all attributes satisfying `f` in a schema
(all-attrs
{:account/number [{:ident :account/number
:type :long}]
:account/date [{:ident :account/date
:type :instant}]}
(fn [attr] (= (:type attr) :long)))
=> {:account/number [{:type :long, :ident :account/number}]}(all-idents fschm f)finds all idents satisfying f in a schema
(all-idents {:account/number [{:ident :account/number :type :long}] :account/date [{:ident :account/date :type :instant}]} (fn [attr] (= (:type attr) :long))) => [:account/number]
finds all idents satisfying `f` in a schema
(all-idents
{:account/number [{:ident :account/number
:type :long}]
:account/date [{:ident :account/date
:type :instant}]}
(fn [attr] (= (:type attr) :long)))
=> [:account/number](is-reverse-ref? attr)predicate for reverse ref
(is-reverse-ref? {:ident :email/accounts :type :ref :ref {:type :reverse}}) => true
predicate for reverse ref
(is-reverse-ref? {:ident :email/accounts
:type :ref
:ref {:type :reverse}})
=> truecljdoc 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 |