This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-11
Channels
- # announcements (3)
- # babashka (62)
- # beginners (58)
- # calva (40)
- # cider (3)
- # clj-kondo (75)
- # cljdoc (14)
- # clojars (8)
- # clojure (110)
- # clojure-australia (6)
- # clojure-europe (38)
- # clojure-hungary (1)
- # clojure-india (4)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-spec (4)
- # clojure-uk (3)
- # clojurescript (45)
- # conjure (4)
- # cursive (35)
- # data-science (1)
- # datomic (11)
- # events (2)
- # exercism (4)
- # figwheel-main (4)
- # fulcro (103)
- # graphql (16)
- # helix (1)
- # holy-lambda (16)
- # honeysql (1)
- # introduce-yourself (3)
- # jobs (1)
- # keyboards (2)
- # lsp (4)
- # malli (11)
- # membrane-term (3)
- # mount (2)
- # nextjournal (2)
- # off-topic (53)
- # pathom (30)
- # pedestal (2)
- # portal (22)
- # rdf (1)
- # re-frame (7)
- # reagent (3)
- # reitit (5)
- # remote-jobs (6)
- # shadow-cljs (20)
- # sql (8)
- # tools-build (10)
- # vim (4)
- # xtdb (12)
@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!
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 ......