precept.schema
a-v-pairs->tuples
(a-v-pairs->tuples e avs)attribute
(attribute ident type & {:as opts})Creates a Datomic schema entry for an attribute. Cardinality defaults to one-to-one. Generates UUID for :db/id.
by-ident
(by-ident schema)enum
(enum ident & {:as fields})guid
(guid)init!
(init! {:keys [db-schema client-schema]})Stores schemas and returns hierarchy for provided schemas and Precept’s internal schema
one-to-many?
(one-to-many? by-ident attr)persistent-attrs
(persistent-attrs)persistent-facts
(persistent-facts)precept-schema
ref-type-attrs
(ref-type-attrs schema)Returns vector of keywords from a Datomic schema that are :db.type/ref.
ref?
(ref? schemas a)schema->hierarchy
(schema->hierarchy schema)Creates a hierarchy from a Datomic schmea by cardinality and uniqueness. Used by implementation to enforce both.
schema-attr?
(schema-attr? by-ident attr)store->tuples
(store->tuples attr-set)unique-attr?
(unique-attr? by-ident attr)unique-attrs
(unique-attrs schema tuples)