Eugene Trifuntov
2017-04-06 12:50:47 UTC
Hello.
I am playing with datomic time filters and faced some behaviour I can't
understand.
Here is the code:
(let [inst #inst "2016-11-09T00:00:00.000-00:00"
db (d/db conn)
ao-db (d/as-of db inst)
tx (d/t->tx (d/basis-t ao-db))]
(d/pull ao-db '[*] tx))
I would expect that `tx` will be the most recent transaction in `ao-db` but
when I do d/pull on it I receive {:db/id 13196381607868} as if there is no
such transaction at all.
Even more strange is that if I'm pulling original db and not as-of'ed I am
getting following map: {:db/id 13196381607868, :db/txInstant #inst
"2017-04-06T11:32:01.712-00:00"} as if the transaction was done today and
not 2016-11-09 :(
So what do I get wrong about datomic's time filters?
I am playing with datomic time filters and faced some behaviour I can't
understand.
Here is the code:
(let [inst #inst "2016-11-09T00:00:00.000-00:00"
db (d/db conn)
ao-db (d/as-of db inst)
tx (d/t->tx (d/basis-t ao-db))]
(d/pull ao-db '[*] tx))
I would expect that `tx` will be the most recent transaction in `ao-db` but
when I do d/pull on it I receive {:db/id 13196381607868} as if there is no
such transaction at all.
Even more strange is that if I'm pulling original db and not as-of'ed I am
getting following map: {:db/id 13196381607868, :db/txInstant #inst
"2017-04-06T11:32:01.712-00:00"} as if the transaction was done today and
not 2016-11-09 :(
So what do I get wrong about datomic's time filters?
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.