hyperfiddle-2020 icon indicating copy to clipboard operation
hyperfiddle-2020 copied to clipboard

Datomic datalog bug - or-join dependency on clause ordering

Open dustingetz opened this issue 6 years ago • 0 comments

Moving [?e :fiddle/ident] below the or-join causes query to fail. http://hyperfiddle.hyperfiddle.net/

[:find 
 (pull ?e [:hyperfiddle/starred 
           :fiddle/ident 
           :db/id])
 (max ?tx)
 :where 
 [?e :fiddle/ident]
 (or-join [?e]
          (and 
            [(ground hyperfiddle.io.bindings/*subject*) ?user-id]
            [?e :hyperfiddle/owners ?user-id])
          [(missing? $ ?e :hyperfiddle/owners)])
 [?e _ _ ?tx]]

dustingetz avatar Feb 04 '19 18:02 dustingetz