std.lib.schema

check-fn-columns

added in 4.0

(check-fn-columns tsch data)

perform a check using the :check key

(schema/check-fn-columns -tsch- {:status ’a}) => {}

check-missing-columns

added in 4.0

(check-missing-columns tsch columns required-fn)

check if columns are missing

check-scope

added in 4.0

(check-scope scope)

check if a scope is valid

check-valid-columns

added in 4.0

(check-valid-columns tsch columns)

check if columns are valid

expand-scopes

added in 4.0

(expand-scopes k)

expand * keys into - keys

get-defaults

added in 4.0

(get-defaults tsch)

get defaults in the schema

get-returning

added in 4.0

(get-returning tsch returning)

collects the returning ids and columns

(->> (schema/get-returning -tsch- :*/data :cache) (map first)) => ’(:id :status :name :cache :time-created :time-updated)

linked-primary

added in 4.0

(linked-primary tsch k schema)

gets the linked primary column

order-keys

added in 4.0

(order-keys tsch ks)

order keys given schema

schema

added in 3.0

(schema x)(schema x defaults)

creates an extended schema for use by spirit

schema?

added in 3.0

(schema? obj)

checks if object is a schema

with:ref-fn

macro

added in 4.0

(with:ref-fn [ref-fn] & body)

passes a function for use in reverse-ref-attr method to add additional params to schema