Liking cljdoc? Tell your friends :D

spirit.data.schema.find


all-attrsclj

(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}]}
raw docstring

all-identsclj

(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]
raw docstring

is-reverse-ref?clj

(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}})
=> true
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close