Fork me on GitHub
#datomic
<
2018-05-05
>
octahedrion14:05:07

can you use or with multiple databases ?

octahedrion15:05:51

(the answer is no: or or-join etc all take an optional $db)

octahedrion20:05:27

why does (d/q '{:find [?e] :in [$0 $1] :where [[$1 ?e :thing _] ]} (first dbs) (second dbs)) return the entities of the first db not the second one ?

Hendrik Poernama15:05:25

(let [dbs [[[123 :a 1] [124 :a 2]]
           [[912 :a 1] [910 :a 2]]]]
  (d/q '{:find [?e]
         :in [$0 $1]
         :where [[$1 ?e :a _]]}
       (first dbs) (second dbs)))
;; => #{[910] [912]}

Hendrik Poernama15:05:33

seems to work fine?

octahedrion15:05:40

hmm I'm using Datomic Cloud

octahedrion15:05:28

does datomic cloud definitely support queries with multiple dbs ? I see nothing in the "differences between" page to suggest it doesn't

octahedrion15:05:05

I must be doing something wrong somewhere

Hendrik Poernama15:05:20

not sure if it works with cloud. Someone asked this before, but I can't find the answer in history