How to find entities with one of several attributes in Datomic -


this seemed use case or clause:

'[:find ?e1   :where (or [?e1 :a ?e2]              [?e1 :b ?e2]              [?e1 :c ?e2])          [?e2 :x "x"]] 

but fails unable resolve symbol: ?e1 in context.

something should work

(let [rules '[(orclause ?e1 ?e2) [?e1 :a ?e2]               (orclause ?e1 ?e2) [?e1 :b ?e2]               (orclause ?e1 ?e2) [?e1 :c ?e2]]       dbval (d/db conn)]   (d/q '[:find ?e1          :in $ ?e2 %          :where (orclause ?e1 ?e2)]        dbval "x" rules)) 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -