Fork me on GitHub
#datomic
<
2024-05-19
>
itaied14:05:33

hey all, how can I "undo" a transaction? I have retracted some entities, that other entities ref to. How can I restore both the retracted entities and the relation to the other entities? I have fetched the data from the tx

(d/q '[:find ?e ?a ?v
                :where
                [?e :metadata/id _]
                [?e ?a ?v]]
              (d/as-of (d/db (get-connection)) 13194139534419))

👀 1
itaied04:05:22

forgot to mention that i have found that answer already, but i dont have the d/log api Im using datomic cloud and its sdk com.datomic/client-cloud

favila04:05:59

Cloud/client just uses tx-range on a connection directly. https://docs.datomic.com/reference/log.html That question+answer was written before client api existed.

🙌 1