This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-20
Channels
- # announcements (9)
- # aws-lambda (5)
- # babashka (26)
- # beginners (200)
- # bristol-clojurians (2)
- # calva (74)
- # cider (22)
- # clj-kondo (8)
- # cljsrn (1)
- # clojure (124)
- # clojure-australia (2)
- # clojure-europe (79)
- # clojure-spec (1)
- # clojure-uk (37)
- # clojurescript (87)
- # cloverage (1)
- # code-reviews (10)
- # conjure (41)
- # cursive (5)
- # datahike (2)
- # datascript (3)
- # datomic (11)
- # docker (4)
- # duct (1)
- # emacs (10)
- # events (1)
- # fulcro (3)
- # graalvm (1)
- # honeysql (3)
- # jobs (1)
- # malli (12)
- # meander (51)
- # off-topic (83)
- # pathom (28)
- # quil (3)
- # reagent (19)
- # reitit (3)
- # releases (1)
- # shadow-cljs (49)
- # spacemacs (2)
- # sql (5)
- # startup-in-a-month (1)
- # testing (1)
- # xtdb (8)
Hello, I have created a function which makes a query to datomic dev-local. When I call it as a normal function the query returns data. When I call it as a transaction function on the same db the query returns nothing. Any ideas?! Many thanks
Confirm, your fn signature looks like (defn fn-name [db arg1 arg2 ,,,])
, you call it “normally” like (fn-name db arg1 arg2 ,,,)
and you “call” it in a tx like [,,, ['namespace/fn-name arg1 arg2] ,,,]
(note fully qualified, implicit db arg omitted)
I throw an exception in the transaction and I include in the message the result of the query. In the case of the transaction it is an empty vector.
In the non-trans version I use (d/db conn) using the same conn as the one in the trans version. So I guess they are the same.
Cognitect dev-tools version 0.9.58 now available. https://forum.datomic.com/t/cognitect-dev-tools-version-0-9-58-now-available/1751