Fork me on GitHub
#core-async
<
2017-10-31
>
uwo04:10:58

I have the result of a clojure.jdbc/reducible-query that I’d like to put onto a channel, however both to-chan and onto-chan appear to rely on the seq interface, which is giving me this error. (I also happen to be applying an eduction to the query result, but i don’t think that’s relevant):

uwo04:10:57

java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.java.jdbc$reducible_query$reify__16834
        at clojure.lang.RT.seqFrom(RT.java:547)
        at clojure.lang.RT.seq(RT.java:527)
        at clojure.lang.RT.iter(RT.java:603)
        at clojure.core.Eduction.iterator(core.clj:7560)
        at clojure.lang.RT.seqFrom(RT.java:537)
        at clojure.lang.RT.seq(RT.java:527)
        at clojure.core$seq__6407.invokeStatic(core.clj:137)
        at clojure.core$seq__6407.invoke(core.clj:137)
        at clojure.core.async$bounded_count.invokeStatic(async.clj:629)
        at clojure.core.async$bounded_count.invoke(async.clj:623)
        at clojure.core.async$to_chan.invokeStatic(async.clj:653)
        at clojure.core.async$to_chan.invoke(async.clj:649)

uwo06:10:29

so it appears the problem is further up the chain, before onto-chan is called. attempts to reduce over (eduction xf (clojure.jdbc/reducible-query ...)) ultimately result in clojure.lang.RT.iter calling seq.