This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-14
Channels
- # aws (6)
- # babashka (31)
- # beginners (69)
- # biff (9)
- # boot (9)
- # bristol-clojurians (1)
- # calva (20)
- # chlorine-clover (2)
- # cider (8)
- # cljsrn (24)
- # clojure (25)
- # clojure-norway (4)
- # clojure-spec (29)
- # clojure-uk (7)
- # conjure (23)
- # datahike (5)
- # datomic (39)
- # emacs (4)
- # fulcro (4)
- # graalvm (11)
- # honeysql (1)
- # lambdaisland (1)
- # leiningen (8)
- # liberator (1)
- # libpython-clj (3)
- # malli (6)
- # mxnet (1)
- # off-topic (94)
- # pedestal (13)
- # re-frame (4)
- # releases (2)
- # shadow-cljs (8)
- # spacemacs (22)
- # sql (9)
- # vim (1)
Hi, where do I put :initial-tx ?
(def cfg {:store {:backend :file :path "data/sovabes"}
:initial-tx [;message schema
{:db/ident :message/messageid
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one }
{:db/ident :message/title
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one }})
not doing the trickanyway, is there a straightforward way to turn the results set #{} into a map?
@sova You can use the :keys syntax to declare what keyword in the return maps should map to which term in the clause head like here: https://github.com/replikativ/datahike/issues/149
@whilo thank you whilo. I ended up simply running the output through a function that looks like
(->>
(d/q ...)
(map (fn [[ aid c t mid ]]
{ :authorid aid :content c :timestamp t :messageid mid}))
(sort-by :timestamp)
(into []))
which is fine, I need some granularity on destructuring and not all fields are useful at all times.