Fork me on GitHub
#datomic
<
2021-04-05
>
Michael Lan03:04:06

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

souenzzo11:04:32

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 (-> "datomic:"
               (doto d/delete-database
                     d/create-database)
               d/connect)
      {:keys [tx-data]} @(d/transact conn [])]
  (d/q '[:find ?tx .
         :where
         [?tx _ _ ?tx]]
       tx-data))

souenzzo11:04:11

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

mkvlr11:04:03

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

✔️ 3
souenzzo11:04:42

@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.

👍 3
mkvlr11:04:50

@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.)