Fork me on GitHub

(let [already? (into
                   '[:find ?key
                     [_ :airstats.jira.ticket/key ?key]]
                   (d/db @conn)))])

  (defn already?
    [db key]
     [:airstats.jira.ticket/key key]))
which is better? the use case is to check if some ticket key is already in the db. So I don't assert it twice


If you make the ticket key unique asserting twice will not work (or work as an upsert). The advantage of that is that it's atomic :)

Benjamin18:11:06 what does it mean for txInstant to be newer than the transactors clock time? The second sentence seems to imply I shouldn't choose dates from the future else it needs to catch up.. ?


That's right, but it is possible to set a txInstant in the past (as long as there's no newer datoms present). As an example, we used it for an initial ETL job to instead of a created-at attribute

✔️ 1