Clojurians
#datomic
<
2016-03-08
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

actsasgeek15:03:05

I’m using q to combine the results from 4 queries. In this query, ?a is a count and I’d basically like to do an outer join against it (default of 0). get-else only works with $ and datomic schemas, I feel like an or might be involved but I can’t quite figure it out. Suggestions?

(d/q
'[:find ?u1 ?a ?b ?c
  :in [[?u1 _]] [[?u2 ?b]] [[?u3 ?c]] [[?u4 ?a]]
  :where 
  [(= ?u1 ?u2)]
  [(= ?u2 ?u3)]
  [(= ?u3 ?u4)]]
  data
  data-b
  data-c
  data-d
)