Welcome! Please see the About page for a little more info on how this works.

0 votes
in On-Prem by
edited by

Given an entity and one of its attributes, is there a way to see the tx that added it without doing a query on history db?

i.e. something other than

(d/q
       '[:find ?tx ?attr ?val ?added
         :in $ ?e
         :where
         [?e ?attr ?val ?tx ?added]]
       (d/history my-db)
       my-eid)

1 Answer

0 votes
by

In the normal database the tuple [E A V Tx added?] is availiable for all datoms added but not retracted (all visible datoms).

If you know the datom you refer in the query exists (is added but not retracted) you can just give my-db as the argument to the query, you don't have to create a history db of it.

...