I have this:
(defn entities [entity-map]
(db/q
'[:find [(pull ?e pattern) ...]
:in $ pattern ?primary-field
:where [?e ?primary-field]]
(:pattern entity-map)
(:primary entity-map)))
which works great. but now I want something like this:
(defn entities-where [entity-map & where-clauses]
(db/q '[:find [(pull ?e pattern) ...]
:in $ pattern ?primary-field [?where ...]
:where
[?e ?primary-field]
?where]
(:pattern entity-map)
(:primary entity-map)
where-clauses))
But can’t seem to make it work.
example entity maps are:
{:primary :lead/id
:pattern '[*, {:lead/status [*]}]}