Datomic's database log is a recording of all transaction data in historic order, organized for efficient access by transaction.


You can access the log via the tx-range API function.
(d/tx-range conn {:start 1000 :end 1020})

The arguments are startT (inclusive), and endT (exclusive). Legal values for these arguments are:

  • txes (transaction entity ids)
  • ts (as e.g. returned from Database.nextT)
  • transaction instants (java.util.Dates)
  • nil (to represent the beginning/end of the log)

tx-range returns a collection of transactions, each of which contains key/value pairs:

:tthe transaction t
:dataa collection of datoms

The datoms implement the datomic.Datom interface. In Clojure, they act as both sequential and associative collections, and can be destructured accordingly.