This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-29
Channels
- # admin-announcements (48)
- # announcements (1)
- # beginners (80)
- # boot (150)
- # cljs-dev (12)
- # clojure (133)
- # clojure-dev (1)
- # clojure-italy (27)
- # clojure-japan (1)
- # clojure-russia (77)
- # clojurescript (236)
- # clojutre (3)
- # code-reviews (1)
- # core-async (14)
- # core-logic (4)
- # core-matrix (15)
- # cursive (5)
- # datomic (30)
- # editors (16)
- # events (1)
- # hoplon (1)
- # ldnclj (17)
- # off-topic (30)
- # om (2)
- # onyx (47)
- # reagent (8)
should i be seeing a different d/basis-t
value for an d/as-of
database in the past?
no matter what i do, i’m always getting the same basis-t and next-t values back
anyone have any ideas?
@robert-stuttaford: I think it's because basis-t is an implementation detail that's leaking through as-of? Recall the part of @stuarthalloway's recent ete datalog talk about the history filters. as I understand things, as-of etc are implemented as things that a) filter the index b) merge the live index and parts of the history index. I don't think any of those actually needs to affect basis-t
thanks, tom
@robert-stuttaford: uh, bad terminology there. When I say "live index" in that para, I mean as opposed to the historical indexes, not the peer in memory stuff
i kinda got that
@caskolkm: I was getting the same error earlier this week. Unfortunately, I don't believe I solved it. (Just deleted and recreated my local db)
I know that probably doesn't help much 😜
plus I usually do (Long. eid)
@robert-stuttaford: kind of late, but if you want the as-of point you need to use as-of-t
— http://docs.datomic.com/clojure/#datomic.api/as-of-t, likewise since requires since-t
http://docs.datomic.com/clojure/#datomic.api/since-t
@bkamphaus: thanks. i do recommend you update the docstrings for basis-t and next-t, because they are not correct
"Returns the t of the most recent transaction reachable via this db value.”
perhaps just a note that its result is not constrained by d/as-of or d/since
@bostonaholic: weird.. Hopefully someone else knows the answer :)
I just tried it again and it worked...
@robert-stuttaford: I think you’re correct that there may be doc improvements that would make sense around using filters, but I don’t think that is necessarily one of them. Sorry, I’m still working on how to best phrase it, but the db value returned by a call to a filter (`as-of`, since
, or your own) - is a db value with the filter applied. the as-of-t and basis-t are different, but basis-t is still the correct basis of the filtered db, even though the filter may filter our the most recent (or several of the most recent) tx(es).
another angle of this, that the db-after returned by with
for an as-of
db filter filters out the prospective data, is also surprising.
@bostonaholic: and cc @caskolkm if you’re able to repro I’d be curious to see, but you’re correct that entity id’s should be java.lang.Long and I’d want to see it repro’d using the correct type of arg to retractEntity
@bkamphaus: thank you for your feedback
not sure what the right way forward is, i just know that it’s not obvious that this is the case, and it can catch people. certainly caught me, and i’ve been using Datomic for a long time
@bostonaholic: can you show me your code?
it was the same as yours, just (Long. eid)
is different
@robert-stuttaford: as somebody who's also been using datomic for a long time, I agree that it's confusing 😞