This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-27
Channels
- # admin-announcements (1)
- # beginners (1)
- # boot (37)
- # cbus (1)
- # cider (44)
- # cljs-dev (16)
- # cljsjs (2)
- # cljsrn (18)
- # clojure (205)
- # clojure-belgium (6)
- # clojure-china (1)
- # clojure-india (1)
- # clojure-russia (24)
- # clojure-spec (21)
- # clojure-turkiye (1)
- # clojure-uk (72)
- # clojurescript (91)
- # core-async (4)
- # cursive (12)
- # data-science (2)
- # datascript (2)
- # datomic (12)
- # emacs (6)
- # flambo (7)
- # funcool (12)
- # hoplon (24)
- # incanter (2)
- # jobs-discuss (29)
- # keechma (2)
- # lein-figwheel (2)
- # leiningen (2)
- # mount (13)
- # nyc (2)
- # om (76)
- # om-next (1)
- # onyx (38)
- # other-languages (4)
- # planck (40)
- # re-frame (33)
- # reagent (101)
- # ring-swagger (5)
- # slack-help (1)
- # untangled (7)
- # yada (14)
Is there a best practice around deref'ing datomic transactions? i.e. should I always deref d/transact so I get errors thrown, or will that be suboptimal?
i suppose when you don't care about seeing an error on the spot, or when you're okay running the transaction asynchronously
d/transact
is actually synchronous, even though it returns a Promise, so you almost always want to deref
it immediately.
Yes. d/transact-async
is truly async, it returns immediately, so you can choose if / when you want to deref
it.
Note in the way the pipeline example here: http://docs.datomic.com/best-practices.html#pipeline-transactions - uses transact-async
, we still deref
to be alerted to errors and handle (in this case just closing channels and aborting, reporting the error).