Since the Datomic schema is itself stored in Datomic, how can I query Datomic to get the currently installed schema? I want to only get the user-level schema, excluding the system-level schema that has things like partitions.
I only started learning Datomic and Datalog pretty recently, so I don't know if things have just changed in the three years it's been since the previous answer, or if this is just a different way of doing the same thing:
[:find ?attr ?type ?card
:where
[_ :db.install/attribute ?a]
[?a :db/valueType ?t]
[?a :db/cardinality ?c]
[?a :db/ident ?attr]
[?t :db/ident ?type]
[?c :db/ident ?card]]
It will give you something that looks like this:
Taken from http://www.learndatalogtoday.org/chapter/4 (solution to challenge 2 at the bottom).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With