Fork me on GitHub

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):


java.lang.IllegalArgumentException: Don't know how to create ISeq from:$reducible_query$reify__16834
        at clojure.lang.RT.seqFrom(
        at clojure.lang.RT.seq(
        at clojure.lang.RT.iter(
        at clojure.core.Eduction.iterator(core.clj:7560)
        at clojure.lang.RT.seqFrom(
        at clojure.lang.RT.seq(
        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)


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.