This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-29
Channels
- # announcements (2)
- # babashka (2)
- # beginners (76)
- # boot (6)
- # calva (7)
- # cider (12)
- # clara (4)
- # clj-kondo (11)
- # cljdoc (9)
- # cljs-dev (21)
- # cljsrn (7)
- # clojure (72)
- # clojure-dev (158)
- # clojure-europe (2)
- # clojure-italy (3)
- # clojure-losangeles (3)
- # clojure-nl (5)
- # clojure-spec (29)
- # clojure-uk (93)
- # clojurescript (40)
- # cursive (7)
- # data-science (1)
- # datomic (28)
- # defnpodcast (5)
- # duct (5)
- # emacs (7)
- # events (2)
- # figwheel-main (5)
- # fulcro (55)
- # graalvm (2)
- # instaparse (1)
- # jobs (5)
- # juxt (1)
- # luminus (3)
- # nyc (2)
- # pathom (3)
- # planck (25)
- # re-frame (2)
- # reagent (4)
- # reitit (23)
- # shadow-cljs (381)
- # spacemacs (6)
- # sql (19)
- # tools-deps (7)
- # xtdb (4)
perhaps this will be useful to some
(defn touch [component-keys db entity]
(let [touch (partial touch component-keys db)]
(into
{}
(map (fn [[k v]]
[k
(if (some #{k} component-keys)
(if (vector? v)
(mapv (comp touch (partial c/entity db)) v)
(touch (crux/entity db v)))
v)]))
entity)))
(let [db (crux/db crux-node)]
(->> #uuid "ce20cc92-a55a-4bf7-9282-4df9f4cbb9e2"
(crux/entity db)
(touch #{:procflow.procedure/steps} db)))
;; => {:procflow.procedure/steps
;; [{:procflow.step/type :text,
;; :crux.db/id #uuid "f45d3c5d-a911-475f-8271-bd8078d131ec"}],
;; :crux.db/id #uuid "ce20cc92-a55a-4bf7-9282-4df9f4cbb9e2"}