Fork me on GitHub
#datahike
<
2020-06-11
>
jrwdunham19:06:31

Is the following guaranteed to give me the most recent N transaction datoms? Is there a better way to do this?

jrwdunham19:06:42

(->>
   (d/datoms @conn :eavt)
   reverse
   (take N))

jrwdunham19:06:44

Oops, I'm thinking that the following is probably a better approach as it will only return :db/txInstant datoms:

jrwdunham19:06:47

(->>
   (d/datoms @conn :aevt :db/txInstant)
   reverse
   (take N))