Liking cljdoc? Tell your friends :D

reflet.db.normalize

Provides data normalization functions.

Provides data normalization functions.
raw docstring

likeclj/s

(like coll xs)

Returns a collection of the same type as coll containing all the elements of xs.

Returns a collection of the same type as coll containing all the
elements of xs.
sourceraw docstring

many?clj/s

(many? x id-attrs)

Returns true if x is a cardinality many value.

Returns true if x is a cardinality many value.
sourceraw docstring

normalizeclj/s

(normalize x {:keys [id-attrs transform-fn] :as opts})

Given a possibly nested entity, returns tx seq of normalized entities. Optionally applies transformation fn to all entities before normalization.

Given a possibly nested entity, returns tx seq of normalized
entities. Optionally applies transformation fn to all entities
before normalization.
sourceraw docstring

ref?clj/s

(ref? x id-attrs)

Returns true if x is an entity reference.

Returns true if x is an entity reference.
sourceraw docstring

refer-manyclj/s

(refer-many xs {:keys [id-attrs] :as opts})

Same semantics as refer-one, but for cardinality many args. Mixing entities or entity references with non-entities is an error, and checking this condition necessarily realizes entire input sequence.

Same semantics as `refer-one`, but for cardinality many args. Mixing
entities or entity references with non-entities is an error, and
checking this condition necessarily realizes entire input sequence.
sourceraw docstring

refer-oneclj/s

(refer-one x {:keys [refer-fn id-attrs] :or {refer-fn find}})

Returns an entity reference to x, if x is a referable entity, nil otherwise.

Returns an entity reference to x, if x is a referable entity, nil
otherwise.
sourceraw docstring

to-manyclj/s

(to-many x id-attrs)

Coerces x to a cardinality many value.

Coerces x to a cardinality many value.
sourceraw docstring

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

× close