Liking cljdoc? Tell your friends :D

hara.data.schema.base


all-auto-defaultsclj

(all-auto-defaults)
(all-auto-defaults meta)

all automatic defaults for the schema

(base/all-auto-defaults) => [{:default :string, :auto true, :id :type} {:default :one, :auto true, :id :cardinality}]

all automatic defaults for the schema

(base/all-auto-defaults)
=> [{:default :string, :auto true, :id :type}
    {:default :one, :auto true, :id :cardinality}]
raw docstring

all-defaultsclj

(all-defaults)
(all-defaults meta)

all defaults for the schema

(base/all-defaults) => [{:default :string, :auto true, :id :type} {:default :one, :auto true, :id :cardinality}]

all defaults for the schema

(base/all-defaults)
=> [{:default :string, :auto true, :id :type}
    {:default :one, :auto true, :id :cardinality}]
raw docstring

attr-add-defaultsclj

(attr-add-defaults [k [attr :as v]] dfts)

adds defaults to a given schema property pair (base/attr-add-defaults [:person [{}]] []) => [:person [{}]]

(base/attr-add-defaults [:person [{}]] [{:default :string, :auto true, :id :type} {:default :one, :auto true, :id :cardinality}]) => [:person [{:cardinality :one :type :string}]]

(base/attr-add-defaults [:person [{:cardinality :many :type :long}]] [{:default :string, :auto true, :id :type} {:default :one, :auto true, :id :cardinality}]) => [:person [{:cardinality :many :type :long}]]

(base/attr-add-defaults [:person [{}]] [{:default false, :id :index} {:default false, :id :fulltext} {:default false, :id :noHistory} {:default :string, :auto true, :id :type} {:default :one, :auto true, :id :cardinality}]) => [:person [{:index false :fulltext false :cardinality :one :noHistory false :type :string}]]

adds defaults to a given schema property pair
(base/attr-add-defaults [:person [{}]] [])
=> [:person [{}]]

(base/attr-add-defaults [:person [{}]]
                        [{:default :string, :auto true, :id :type} 
                         {:default :one, :auto true, :id :cardinality}])
=> [:person [{:cardinality :one :type :string}]]

(base/attr-add-defaults [:person [{:cardinality :many :type :long}]]
                        [{:default :string, :auto true, :id :type} 
                         {:default :one, :auto true, :id :cardinality}])
=> [:person [{:cardinality :many
              :type :long}]]

(base/attr-add-defaults [:person [{}]]
                        [{:default false, :id :index} 
                         {:default false, :id :fulltext} 
                         {:default false, :id :noHistory} 
                         {:default :string, :auto true, :id :type} 
                         {:default :one, :auto true, :id :cardinality}])
=> [:person [{:index false
              :fulltext false
              :cardinality :one
              :noHistory false
              :type :string}]]
raw docstring

attr-add-identclj

(attr-add-ident [k [attr :as v]])

adds the key of a pair as :ident to a schema property pair (base/attr-add-ident [:person [{}]]) => [:person [{:ident :person}]]

(base/attr-add-ident [:person/address [{}]]) => [:person/address [{:ident :person/address}]]

adds the key of a pair as :ident to a schema property pair
(base/attr-add-ident [:person [{}]])
=> [:person [{:ident :person}]]

(base/attr-add-ident [:person/address [{}]])
=> [:person/address [{:ident :person/address}]]
raw docstring

base-metaclj


defaultsclj

(defaults [k prop])

constructs a map according to specifics

(base/defaults [:person/name {:default "Unknown" :auto true}]) => {:default "Unknown", :auto true, :id :person/name}

constructs a map according to specifics

(base/defaults [:person/name {:default "Unknown"
                              :auto true}])
=> {:default "Unknown", :auto true, :id :person/name}
raw docstring

type-checkscljmultimethod

gets type-checks according to category

((base/type-checks :default :string) "Hello") => true

gets type-checks according to category

((base/type-checks :default :string) "Hello")
=> true
raw docstring

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

× close