This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-29
Channels
- # beginners (24)
- # boot (6)
- # cider (22)
- # cljsjs (1)
- # cljsrn (12)
- # clojars (3)
- # clojure (170)
- # clojure-china (2)
- # clojure-dusseldorf (18)
- # clojure-finland (1)
- # clojure-italy (32)
- # clojure-nl (1)
- # clojure-russia (65)
- # clojure-sanfrancisco (1)
- # clojure-spec (21)
- # clojure-uk (46)
- # clojurescript (92)
- # clojutre (1)
- # clr (7)
- # cursive (7)
- # datomic (6)
- # dirac (49)
- # emacs (17)
- # events (1)
- # funcool (20)
- # hoplon (6)
- # job (1)
- # jobs (1)
- # keechma (2)
- # leiningen (6)
- # lumo (74)
- # off-topic (15)
- # om (7)
- # onyx (40)
- # overtone (4)
- # pedestal (8)
- # powderkeg (4)
- # proton (2)
- # protorepl (2)
- # re-frame (18)
- # reagent (24)
- # ring-swagger (3)
- # rum (15)
- # slack-help (1)
- # spacemacs (20)
- # uncomplicate (62)
- # unrepl (29)
- # untangled (10)
- # yada (10)
is there an easy way to do the following - if the param
is present, bind it as in [:find ?x :in $ ?param :where [?x :x/param ?param] ...]
; if it’s nil - effectively skip the clause: [:find ?x :in $ ?param :where …]
?
also - what’s the best way to get the time of the transaction from the tx report queue? I understand the relevant attribute is :db/txInstant
, but getting to the tx entity seems too onerous, e.g. (:db/txInstant (d/entity (:db-after tx) (d/t->tx (d/basis-t (:db-after tx))))
- is there a simpler way?
This also works:
(let [a (:id (d/attribute (:db-after tx) :db/txInstant))]
(:v (m/find-first #(= a (:a %)) (:tx-data tx))))
I guess I could cache the attribute id...