denistakeda / posh

A luxuriously simple and powerful way to make front-ends with DataScript and Reagent in Clojure.
Eclipse Public License 1.0
114 stars 9 forks source link

Query does not work if (>= (count inputs) 8) #8

Open ribelo opened 4 years ago

ribelo commented 4 years ago

Code to reproduce the behavior:

(let [query '[:find [?e ...]
              :in $ ?a ?s ?d ?f ?g ?h ?j ?k
              :where [?e]]
      pre-q (partial posh.reagent/q query @re-posh.db/store)
      vars  [:a :s :d :f :g :h :j :k]]
    (apply pre-q vars))

;;=> Error: :k is not ISeqable

If we use datascript directly, it works

(let [query '[:find [?e ...]
              :in $ ?a ?s ?d ?f ?g ?h ?j ?k
              :where [?e]]
      pre-q (partial d/q query @@re-posh.db/store)
      vars  [:a :s :d :f :g :h :j :k]]
    (apply pre-q vars))

;;=> [1 2 3 4 5 6 7 8 9 10]