Fork me on GitHub
#datomic
<
2019-10-12
>
bartuka09:10:31

when perform a db/history query, how can I get only datoms that have the same db/txInstant?

benoit10:10:15

db/txInstant is an attribute of a transactions so I'm guessing you want to access all datoms asserted by a transaction?

bartuka10:10:41

yes, that's right. When performing db/history and filtering for a single datom, I find the entity that I want to but it brings back all other datoms of the history. I would like to get back only the datoms asserted by the transaction of the datom that I am using to filter the query. [confusing? :/]

benoit10:10:46

You should be able to filter like this:

[?tx :db/txInstant <your-instant>]
[?e ?a ?v ?tx ?op]

benoit10:10:22

That should show you only the datoms of the tx you're interested in.

favila01:10:43

That is going to be extremely inefficient if e or a are unbound

favila01:10:24

If you have a specific tx and you want to know what happened in it, use the log and tx-range instead

benoit12:10:04

Yes, but @UBSREKQ5Q said they know what entity they want to so I assumed ?e is already bound to something. But if not, @U09R86PA4 is right, do not do that 🙂

Socks16:10:34

What happens if you update the compute cluster before the storage as your told not to here: https://docs.datomic.com/cloud/operation/upgrading.html#storage-and-compute

dustingetz18:10:38

What is the state of art of unifying Datomic schema with clojure.spec