This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-20
Channels
- # announcements (1)
- # asami (6)
- # babashka (21)
- # beginners (19)
- # calva (44)
- # circleci (3)
- # clj-http (3)
- # clj-kondo (44)
- # clojure (24)
- # clojure-australia (1)
- # clojure-czech (1)
- # clojure-europe (50)
- # clojure-france (5)
- # clojure-germany (1)
- # clojure-nl (2)
- # clojure-spec (8)
- # clojure-uk (8)
- # clojurescript (161)
- # datomic (4)
- # fulcro (7)
- # graalvm (8)
- # heroku (4)
- # lambdaisland (4)
- # lein-figwheel (5)
- # lsp (48)
- # malli (21)
- # meander (15)
- # off-topic (35)
- # polylith (2)
- # re-frame (21)
- # react (22)
- # reagent (13)
- # reitit (6)
- # remote-jobs (1)
- # reveal (3)
- # ring (3)
- # shadow-cljs (37)
- # testing (2)
- # tools-deps (10)
- # vim (18)
- # vrac (1)
- # xtdb (17)
Hey, there's actually an SPA embedded on the routes for crux-http-server
so you can curl
for the raw data or open the same url in a browser to see some visuals 🙂 it's still work-in-progress but I'd be interested to hear if you find it useful already
thanks @taylor.jeremydavid, I got curious because wanted to show my entities to other people that does not know crux yet but knows mongodb
Ah okay, well we definitely have some more work to do before it's as useful as Compass! It's good to hear that there's interest in such a thing though, thanks
thanks @U086PHBK8
I'm definitely interested in such a tool - obviously you can use a repl, but it is nice to have the UI option. I tried the http-server recently and saw there are some exceptions with certain queries - are contributions welcome for addressing some of these things or adding features? or is this too unstable and likely to change to be worth investing the time in?
@U051V5LLP What sort of exceptions were you seeing? If you mean capital-E Exception
, there is infinite appetite for bug fixes. 😉 If there are exceptional cases you'd like to build features for, I'm willing to bet there's appetite for that too but it's probably worth opening a GitHub issue to build against and/or pinging @taylor.jeremydavid and/or @U050V1N74 to check if your patch will run up against any obvious problems.
Thanks Steven - yep they were js Exceptions. Good to know bug fixes are welcome 🙂 I don't have my dev env setup right now but I'll keep it in mind to open some GitHub issues for those and for any features that cross my mind
even casually throwing a screenshot up on here (with the js console visibly open) would be great 🙏
@taylor.jeremydavid are we able to contribute with documentation?
yes, certainly - if you have small suggestions about wording or an example to add you can just message me and I'll happily do the work to amend the docs accordingly. However if you are keen to create a PR and want to work on the docs locally then you should be able to follow the instructions here: https://github.com/juxt/crux/tree/master/docs
it was not clear to me the role of :crux.db/id
inside joins. From this example below, I should keep my domain entity id and crux.db/id to be the same values. is this correct conclusion? (when they are different, the join does not work)
;;; example 1 - crux.db/id different from my entity id
(def e1 {:crux.db/id "112" :wand/id "111" :wand/valor 42 })
(def e2 {:crux.db/id "223" :veri/id "222" :veri/wand.id "111" :veri/valor 24})
(crux/submit-tx crux-node [[:crux.tx/put e1]])
(crux/submit-tx crux-node [[:crux.tx/put e1]])
(crux/q (crux/db crux-node)
'{:find [(pull e [:veri/valor {:veri/wand.id [:wand/valor]}])]
:where [[e :veri/id "222"]]})
;; => #{[#:veri{:valor 24, :wand.id {}}]}
;;; example 2 - crux.db/id the same as my entity id
(def ee1 {:crux.db/id "333" :wand/id "333" :wand/valor 42})
(def ee2 {:crux.db/id "444" :veri/id "444" :veri/wand.id "333" :veri/valor 24})
(crux/submit-tx crux-node [[:crux.tx/put ee1]])
(crux/submit-tx crux-node [[:crux.tx/put ee2]])
(crux/q (crux/db crux-node)
'{:find [(pull e [:veri/valor {:veri/wand.id [:wand/valor]}])]
:where [[e :veri/id "444"]]})
;; => #{[#:veri{:valor 24, :wand.id #:wand{:valor 42}}]}