This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-05
Channels
- # 100-days-of-code (13)
- # announcements (3)
- # beginners (120)
- # boot (17)
- # calva (19)
- # cider (27)
- # cljdoc (3)
- # cljs-dev (1)
- # clojure (138)
- # clojure-dev (5)
- # clojure-italy (5)
- # clojure-nl (20)
- # clojure-russia (3)
- # clojure-spec (14)
- # clojure-uk (119)
- # clojurescript (45)
- # core-async (2)
- # datomic (23)
- # editors (28)
- # emacs (35)
- # figwheel (2)
- # fulcro (26)
- # graphql (2)
- # hyperfiddle (11)
- # jobs (4)
- # luminus (5)
- # mount (2)
- # off-topic (52)
- # onyx (39)
- # reagent (86)
- # ring-swagger (2)
- # spacemacs (20)
- # tools-deps (9)
- # yada (4)
@dfcarpenter have you looked at the mbrainz db?
@eoliphant I will take a look
Thanks
How do I turn off the logging in the repl when running datomic?
(.setLevel (org.slf4j.LoggerFactory/getLogger "datomic") ch.qos.logback.classic.Level/WARN)
may do it
@dfcarpenter Datomic on-prem? You can edit your logback.xml
to adjust level and logger target
Can I check if an input has a specific attribute - That is give entity ?e as input arg and return ?match if attribute ?e :whatever
Where (= ?match ?e)
did you figure out what you need here? I’m not exactly sure what you’re going for, but I think you can do it more simply than by using the ‘=’ predicate
I want do something like (d/q '[:find [?match ...] :in $ [?e] :where [?e :schema/type :logger] [(= ?e ?match)])
It can be done in an easier way just by using d/entity
and filter
, but still?
identity
can be used to force the var
What does it mean when a peer logs at INFO "datomic.kv-cluster: {:event :kv-cluster/get-pod-meta, :pod-key "...", ...} with the same pod-key lots and lots and lots of times in a row?
Has anyone found a preferred way to compose or at least parameterize pull expressions in queries? I find using syntax quote to be a bit awkward, because of the need to var-unquote all of the other symbols in the query with ~'
I was doing this for a while with clojure.walk/postwalk. Just something like (clojure.walk/postwalk #(get params % %) expr)
, and then you can replace some symbol with a value.
Of course, use rules first, if you can. And pass extra parameters to q
and bind with :in
. if you can.
Thanks for all of the replies. I think I’ll try the postwalk approach. This may be a bad idea, but I’m thinking of using a symbol prefixed with !
(e.g. !customer-with-address
) and postwalk to replace those from a params list
You can just pass pull expressions as inputs to your query: (d/q ‘[:find (pull ?attr my-pull) . :in $ my-pull :where [:db.part/db :db.install/attribute ?attr]] $ [’* :db/doc])