This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-03
Channels
- # aleph (6)
- # announcements (4)
- # babashka (73)
- # beginners (117)
- # calva (25)
- # chlorine-clover (59)
- # cider (21)
- # clara (3)
- # cljdoc (8)
- # cljs-dev (54)
- # cljsrn (15)
- # clojure (65)
- # clojure-france (5)
- # clojure-spec (3)
- # clojure-uk (13)
- # clojurescript (79)
- # conf-proposals (1)
- # conjure (17)
- # core-logic (11)
- # datomic (21)
- # fulcro (82)
- # graalvm (11)
- # helix (7)
- # jobs-discuss (11)
- # joker (2)
- # juxt (3)
- # local-first-clojure (1)
- # luminus (5)
- # nrepl (61)
- # off-topic (12)
- # pathom (70)
- # re-frame (3)
- # reitit (3)
- # rum (1)
- # shadow-cljs (58)
- # sql (1)
- # tools-deps (26)
- # xtdb (3)
Morning I'm trying to introduce an 'or' clause into a (cloud) datomic query, but I'm seeing a
Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).
Nil or missing data source. Did you forget to pass a database argument?
error.
So this query works as expected
(datomic.client.api/q
{:query '[:find (pull ?e [*])
:in $u [?uid ...]
:where [$u ?e :game/red-player ?uid]]
:args [(dca/db datomic-game-conn)
[#uuid "c5658831-892e-4c67-b87e-d39a5a6a5660"]]} )
but this gives me an error 'or' clause introduced in the where
(datomic.client.api/q
{:query '[:find (pull ?e [*])
:in $u [?uid ...]
:where (or [$u ?e :game/red-player ?uid])]
:args [(dca/db datomic-game-conn)
[#uuid "c5658831-892e-4c67-b87e-d39a5a6a5660"]]} )
Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).
Nil or missing data source. Did you forget to pass a database argument?
what am I doing wrongly?oh I think it works if I replace named database` $u
with *anonymous database $
perhaps its the datomic-queries-across-multiple db angel Tthat I'm having problems with
are multi-cloud--database queries be possible when using datomic cloud?
is it just or
clauses that are a problem?
(datomic.client.api/q
{:query '[:find (pull ?e [*])
:in $u [?uid ...]
:where ($u or [?e :game/red-player ?uid])]
:args [(dca/db datomic-game-conn)
[#uuid "c5658831-892e-4c67-b87e-d39a5a6a5660"]])
ooh thanks
I never would have guessed that syntax; is it in the docs anywhere?
ah but your point is that there is no benefit in specifying the datasource as $u
because There Can Be Only One
so I may as well leave it implicit and get on with my life
That wasn’t really my point. It was that rules have this data source limitation so they have a special syntax
Thankyou
Hi, just ran into this issue: https://forum.datomic.com/t/ion-get-params-throws-exception-when-returning-more-than-10-values/1303
The ion docs recommend using ion/get-params, but get-params breaks after 10 params
Can't this break production deployments if all you do is add too many params to param store? This seems like it needs to be fixed.
Since we have no control over when an ion restarts, it could happen without a deploy and rollbacks could fail.
I've fixed in my own deployment by paging and partitioning