Fork me on GitHub
#datomic
<
2015-07-26
>
robert-stuttaford11:07:28

@shofetim: if you’re ok with System Time being synonymous with Domain time - that is, datomic’s transaction time is good enough for your app’s notion of the time when things occured, then you can simply use d/as-of and d/since to constrain queries about time

robert-stuttaford11:07:08

if you have timestamps that differ to Datomic’s transaction time, then you can annotate transactions as you write them

robert-stuttaford11:07:09

@(d/transact conn
             [[:db/add (d/tempid :db.part/tx) :your.domain/timestamp ts]
              ... ])

robert-stuttaford11:07:42

anything you write to a tempid for :db.part/tx will be asserted on the reifed transaction entity directly

robert-stuttaford11:07:47

then, you can use d/filter to write your own as-of and since filters. i’ve not yet done this personally, so i don’t know how to do that performantly, yet.

val_waeselynck12:07:05

Can I pass a set of 3-tuples as a data source to a Datalog query and treat it exactly as I would a Datomic database value? I think I read it's possible, but can't really get it to work

val_waeselynck12:07:10

Nvm I just had to remove the ? from datasources names

kachayev18:07:00

@val_waeselynck: here is a nice set of examples from Stuart for doing this: https://gist.github.com/stuarthalloway/2645453