stillsuit.datomic.core

Implementation functions for dealing with datomic interactions.

coerce-to-datomic-type

(coerce-to-datomic-type input datomic-type)

Given an input value as a string (lacinia type ’ID) and a datomic value type, coerce the input to the proper type.

datomic-db?

(datomic-db? thing)

entity?

(entity? thing)

get-entity-by-eid

(get-entity-by-eid db eid)

get-entity-by-unique-attribute

(get-entity-by-unique-attribute db attribute-ident value)

guess-entity-ns

(guess-entity-ns entity)

Given a random entity, iterate through its attributes and look for one that is marked as :db.unique/identity. Return the namespace of that attribute as a string.