Open
Description
Thank you for this project. As I get acclimated to Datomic, it's been extremely helpful to visualize my attribute namespaces in terms of the more familiar ER conventions.
The Problem
It's possible I'm not understanding the diagram correctly since I'm working with Datomic for the first time, but it appears to me that Enums are not modelled correctly.
In the diagram snippet at the bottom of this description, why does the "dataType:ref" attribute point to "db" and not to a "field.dataType" object?
Steps to Reproduce
- (1) Transact the following schema data structure literals
{:db/id #db/id[:db.part/db]
:db/ident :field/dataType
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one
:db/fulltext false
:db/doc "Refers to one of the :field.dataType/* values."
:db.install/_attribute :db.part/db}
;; text, text_multiLine, number, date, bool, lookup, complex
[:db/add #db/id[:db.part/user] :db/ident :field.dataType/text]
[:db/add #db/id[:db.part/user] :db/ident :field.dataType/textMultiLine]
[:db/add #db/id[:db.part/user] :db/ident :field.dataType/number]
[:db/add #db/id[:db.part/user] :db/ident :field.dataType/date]
[:db/add #db/id[:db.part/user] :db/ident :field.dataType/boolean]
[:db/add #db/id[:db.part/user] :db/ident :field.dataType/lookup]
[:db/add #db/id[:db.part/user] :db/ident :field.dataType/complex]
- (2) Run "datomic-schema-grapher" (0.0.1)
#!/bin/bash
lein exec -pe "(require '[datomic-schema-grapher.core :refer (graph-datomic)])(graph-datomic \"datomic:dev://localhost:4334/mydb\" :save-as \"docs/mydb-schema.dot\" :no-display true :exit-on-close true)(System/exit 1)"
/usr/local/Cellar/graphviz/2.38.0/bin/dot -Tpng docs/mydb-schema.dot > docs/mydb-schema.png
open docs/mydb-schema.png
- (3) View diagram
Metadata
Assignees
Labels
No labels