datomic-spec icon indicating copy to clipboard operation
datomic-spec copied to clipboard

::find-rel spec wins over ::find-tuple in find

Open igrishaev opened this issue 5 years ago • 0 comments

There is a little problem with the ::find-spec spec:

(s/def ::find-spec
  (s/alt :rel ::find-rel
         :coll ::find-coll
         :tuple ::find-tuple
         :scalar ::find-scalar))

At the moment, it's just impossible to dive into the ::find-tuple branch because ::find-rel always wins. For example:

[:find [?e ?r]

will produce

{:find
 {:find-kw :find,
  :spec
  [:rel [[:agg {:name ?e, :args [[:var ?r] [:cst [:str "test"]]]}]]]},

which is not what we want.

igrishaev avatar Sep 02 '19 19:09 igrishaev