This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-28
Channels
- # beginners (33)
- # boot (58)
- # cider (21)
- # cljs-dev (197)
- # cljsrn (112)
- # clojure (136)
- # clojure-belgium (5)
- # clojure-dev (57)
- # clojure-greece (1)
- # clojure-italy (3)
- # clojure-russia (6)
- # clojure-spec (148)
- # clojure-uk (54)
- # clojurescript (29)
- # cursive (24)
- # datomic (36)
- # devops (4)
- # emacs (11)
- # figwheel (1)
- # graphql (18)
- # hoplon (6)
- # leiningen (2)
- # luminus (4)
- # off-topic (7)
- # om (4)
- # onyx (27)
- # precept (1)
- # protorepl (12)
- # quil (1)
- # re-frame (28)
- # reagent (10)
- # ring (9)
- # robots (1)
- # rum (2)
- # slack-help (5)
- # spacemacs (16)
- # sql (16)
- # untangled (16)
- # vim (3)
- # yada (2)
@yusup I believe there are two options, using log API to get assertions/retractions since t: 1) Add/retract respectively (keep history of the rollback) b) Excise them http://docs.datomic.com/excision.html (history is gone)
As @danielstockton said, you can issue a set of compensating transactions
t will continue to increase in either scenario. Unless you have a backup of the db at the specific t you want there isn’t a way to revert the entirety of a db (including t values)
unless you’re just wanting to ‘revert’ for reading (i.e. “show me what the database looked like yesterday”)
if that’s what you’re looking for you can use asOf to get a value of the database exactly as it was at a given time in the past
@yusup note that you won't be able to use db.with() on the asOf db
@val_waeselynck you can’t fork the past?
@hmaurer exactly, I don't know why, already complained about it on http://receptive.io - if it hurts you too, you can upvote the feature request :)
@val_waeselynck It doesn’t hurt me right now as I haven’t used Datomic on a project yet, but it sounds like a feature that could be extremely valuable when debugging
e.g. go back in time and wonder “what would have happened if those operations were applied instead”
I couldn't agree more
Maybe @marshall can give us a technical reason if there is one?
We're really interested in using that kind of feature for post-mortem debugging, to exactly reproduce errors
@danielcompton you could do something similar on a transient basis using datomic.api/with
@spieden I can query the db as of that time, but I can't issue transactions on the db as of that time
@danielcompton using d/with i believe you could, in a way. you’d have to pass the dbval returned around to other code for it to see your changes
I don't think that's possible at the moment
np, we're pretty keen on this kind of feature 🙂
i used d/with for the first time in production code recently. handy for accessing all the data related to an entity you’ll transact later if everything works out
Indeed, it's not possible. It will not throw an exception, but it will return an incorrect result.
(I've tried)
Is there a way to see what the result of calling a transactor function would be without actually calling the function? I have a retractEntity
that's acting a little squirrelly and I want to check my math
Awesome, thanks @favila