(filter-kv db m)
Get entities that satisfy filter conditions
specified in m. m is a map of keyword -> values
and become conditions in the :where
clause.
Answers with a seq of datomic entities that match.
If a value is nil then adds that as a missing?
call.
Get entities that satisfy filter conditions specified in m. m is a map of keyword -> values and become conditions in the `:where` clause. Answers with a seq of datomic entities that match. If a value is nil then adds that as a `missing?` call.
(get-all-entities-with-attr db attr)
Answers with all entities that have the specified attribute
Answers with all entities that have the specified attribute
(get-by-composite-key db m)
Returns the only entity that matches filter conditions in m
.
Throws when more than one match is found.
Returns the only entity that matches filter conditions in `m`. Throws when more than one match is found.
(get-entities-with-attr-by-ids db attr ids)
Get all entities by id which also have the specified attribute. If the ids is an empty seq then returns an empty seq.
Get all entities by id which also have the specified attribute. If the ids is an empty seq then returns an empty seq.
(get-entity-with-attr db id attr)
Answers with the entity for the id and attr specified. Makes sure the attr is on the entity otherwise returns nil. db is Datomic record, id is an integer attr is a keyword.
Answers with the entity for the id and attr specified. Makes sure the attr is on the entity otherwise returns nil. db is Datomic record, id is an integer attr is a keyword.
(get-parent db ident eid)
Get's the parent for the entity with eid. ident is a keyword with reverse attribute navigation ie :parent/_attribute (NOT :parent/attribute). :parent/attribute must be of type :db.type/ref.
Get's the parent for the entity with eid. ident is a keyword with reverse attribute navigation ie :parent/_attribute (NOT :parent/attribute). :parent/attribute must be of type :db.type/ref.
(get-partitions db)
Enumerates all partitions in the db.
Enumerates all partitions in the db.
(new-datomic-db uri)
Creates a new datomic db.
Creates a new datomic db.
(prepare-create m)
Removes all keys where there is an associated nil value.
Removes all keys where there is an associated nil value.
(prepare-update entity m)
(prepare-update db eid-or-lookup m)
m is a map of updated values, if m has nil values lookup the current value and generate a retraction.
m is a map of updated values, if m has nil values lookup the current value and generate a retraction.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close