Fork me on GitHub
#datomic
<
2024-04-19
>
onetom04:04:22

what are the most minimal minimal steps required to make the datomic.core.db NS loaded (on a Datomic Cloud ion server)? this NS has a lot of useful utils, like datomic.core.db/pretty-datum, but im not able to require it in a freshly started REPL:

user=> (require 'datomic.core.db)
Execution error (FileNotFoundException) at user/eval12145 (REPL:1).
Could not locate datomic/core/db__init.class, datomic/core/db.clj or datomic/core/db.cljc on classpath.
however, after loading my whole (Datomic Cloud) app, the datomic.core.db NS is available both locally and on ion servers.

cch112:04:59

I've never encountered this namespace... how did you find it?

onetom17:04:44

i wanted to extend puget printer, so it can print datums in transaction results (`:tx-data` from d/transact & d/with or just :data from d/tx-range) more concisely and for that i needed to know what's the type of a datum, which came back as datomic.core.db.Datum. so i've peeked into that NS with (clojure.repl/dir datomic.core.db) and checked the vars with clojure.repl/doc, eg. (clojure.repl/doc datomic.core.db/reverse-key?)