Fork me on GitHub

@mbarillier You can't use lazy sequences safely with JDBC queries because the connection has to be managed (opened/closed) around the processing of the data.


If you use execute! you get a vector. If you use plan, you must reduce the result (or transduce it). Either way, the processing must be eager.


@seancorfield fark ..... okee, thanks


What problem are you trying to solve that has you reaching for lazy sequences in the first place?


reading a large dataset from a db, want to push it through a filter/transform (lazily) prior to user code processing it with transduce/`reduce`. transforms I want to perform within the "lazy-seq" part is probably more complex than I'd like to perform with sql.


this is true -- not going to dismiss that solution, thx!


perhaps you can compose your filter/transform into the transducer

👍 1

I was preferring to create a stream of processed records, with the xform baked inside the lazy seq, but it's looking like that's going to be problematic. I'll re-engineer the api, won't be quite as sexy, but it'll work. thanks, all ......