datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
Michael Lan 2021-04-05T03:19:06.179Z

Hi! I have loaded the sample data from here: https://docs.datomic.com/cloud/dev-local.html#samples and am wanting to experiment with this data. However, I don’t know how I can view the data… I would appreciate some pointers or links to guides

souenzzo 2021-04-05T11:28:32.180200Z

Why do d/transact do not return the "tx" number? How is the easiest way to get the tx from the return of a d/transaction?

(let [conn (-&gt; "datomic:<mem://hello>"
               (doto d/delete-database
                     d/create-database)
               d/connect)
      {:keys [tx-data]} @(d/transact conn [])]
  (d/q '[:find ?tx .
         :where
         [?tx _ _ ?tx]]
       tx-data))

mkvlr 2021-04-05T11:35:50.181400Z

@souenzzo I think you can use db-after and use that to get basis-t https://docs.datomic.com/on-prem/clojure/index.html#datomic.api/basis-t followed by t-&gt;tx https://docs.datomic.com/on-prem/clojure/index.html#datomic.api/t->tx

souenzzo 2021-04-05T11:38:11.182300Z

How it can be done in Cloud?! Cloud API do not have the t-&gt;tx operation

mkvlr 2021-04-05T11:39:03.183Z

@souenzzo oh sorry didn’t know about that, I’m just using on-prem.

✔️ 1
souenzzo 2021-04-05T11:40:42.184200Z

@mkvlr I'm also on on-prem, but many times we "consider move to cloud" I'm just accumulating facts to argue that on-prem still way better then cloud.

👍 1
mkvlr 2021-04-05T11:44:50.186600Z

@souenzzo yeah, we also also considered supporting cloud but the lack of tx-report-queue and the entity api has been a problem for us. We rely heavily on both. (Besides us being currently on google cloud.)