This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (2)
- # architecture (5)
- # beginners (118)
- # cider (5)
- # clara (13)
- # cljdoc (8)
- # cljs-dev (49)
- # cljsjs (2)
- # clojure (107)
- # clojure-dev (9)
- # clojure-europe (3)
- # clojure-italy (58)
- # clojure-japan (2)
- # clojure-nl (6)
- # clojure-spec (89)
- # clojure-uk (27)
- # clojurescript (9)
- # core-async (33)
- # cursive (2)
- # datascript (2)
- # datomic (31)
- # duct (4)
- # emacs (1)
- # events (1)
- # figwheel-main (1)
- # fulcro (69)
- # hoplon (7)
- # hyperfiddle (16)
- # incanter (4)
- # instaparse (4)
- # kaocha (1)
- # mount (2)
- # nrepl (19)
- # off-topic (40)
- # onyx (6)
- # other-languages (3)
- # pedestal (2)
- # re-frame (48)
- # reagent (2)
- # reitit (10)
- # ring-swagger (9)
- # shadow-cljs (63)
- # spacemacs (13)
- # sql (8)
not-join should work
You need a clause outside of the not-join to bind the
(d/q '[:find ?group :where [?group :group/id] (not-join [?group] [?group :user-group/users ?u] [?u :user/activated false])])
?groupto something that is a group (here I guessed
:group/id). Otherwise you will get all entities that don't have users that are not activated ... which is probably a lot 🙂
@me1740 Ah, awesome, that did it. I was missing the binding of users to groups inside the not-join. Thanks!
I am deploying it via cloudformation, following this guide: https://docs.datomic.com/on-prem/aws.html
@mmuallem with on-prem the idiomatic way to include custom fns is to install them as db or transactor fns. it is possible to add your jar to the classpath for the datomic peer or transactor but that’s up to your devops. Cloud has a much nicer story i.e. it reads your deps.edn and deploys that classpath to all the nodes. In other words it handles the devops for you. So you should use this as one way to pick between on-prem vs cloud
hey @steveb8n, thanks for getting back to me. Unfortunately, the decision of going with on-prem vs. cloud has been made in favor of our own deployment. I am picking up the OPs from the old person, and I am new to this. Currently, we are using a modified cloudformation template and start scripts to inject the jar file directly into our bin folder. It works, but it requires a recreating of the CF stack to pick up the new jar file. I need to a find a way that's more scalable. Can you please shed a bit more light on this:
it is possible to add your jar to the classpath for the datomic peer or transactor but that’s up to your devops. Many thanks!
Sadly I can’t. I have not deployed on-prem using CF so I’m shallow on knowledge there. I read somewhere that it was possible to augment the JVM classpath for on-prem but have not done it myself. Maybe someone else here (when they wake up) has more experience with this?
just in case: do you need a jar or could your custom fns be installed instead? using 3rd party libs I presume? if not, you can avoid all this
Hi everyone 👋 I hope this doesn't sound like a silly question, but... Is there a way to construct a value out of two other columns within a datalog query? Similar to how you would achieve the following in T-SQL:
SELECT t1.foo + '_' + t1.bar AS foobar FROM t1
Something like this seems to work:
(d/q '[:find ?e ?str :where [?e :company/name ?name] [?e :company/group ?gname] [(str ?name ", " ?gname) ?str]] (db))
Always good to find recommended learning resources other than official docs 🙂 Sometimes helps to fill in gaps of knowledge
@U06B8J0AJ another post someone shared with me that was very easy to digest was http://gigasquidsoftware.com/blog/2015/08/15/conversations-with-datomic/
is there a way to get the datoms transacted between 2 't' values (in the client api (cloud))?
@U06GS6P1N ok. I don't even know why I was asking this. Confusion about the 'live' transaction log not being available in cloud I guess 🙂
Have I asked this before? We sometimes have a peer lose connection to the transactor, and since it mostly operates correctly as a read-only clone, we don't discover this for a while. Is there something we can do to check if we are still connected that doesn't transacting?
Maybe use d/sync, or submit a transaction that throws an exception via a function
Is the idea with
dev events should show up in CloudWatch automatically? I may be searching incorrectly, but it seems like mine aren't making it.
@robert.mather.rmm I think dev events are just on your local machine.
Dev is information of interest only to developers, e.g. fine-grained logging to troubleshoot a problem during development. Dev data can be much higher volume than events or alerts.
I get a couple reflection warnings when creating a Datomic client:
Reflection warning, cognitect/hmac_authn.clj:80:12 - call to static method encodeHex on org.apache.commons.codec.binary.Hex can't be resolved (argument types: unknown, java.lang.Boolean). Reflection warning, cognitect/hmac_authn.clj:80:3 - call to java.lang.String ctor can't be resolved.