This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-16
Channels
- # aleph (1)
- # announcements (16)
- # babashka (36)
- # beginners (62)
- # calva (15)
- # cider (21)
- # cljsrn (5)
- # clojure (84)
- # clojure-dev (3)
- # clojure-europe (22)
- # clojure-italy (2)
- # clojure-nl (2)
- # clojure-uk (3)
- # clojurescript (36)
- # core-async (2)
- # cursive (4)
- # datomic (8)
- # emacs (14)
- # events (1)
- # fulcro (4)
- # hyperfiddle (6)
- # introduce-yourself (3)
- # jobs (1)
- # leiningen (4)
- # lsp (100)
- # nrepl (3)
- # off-topic (36)
- # pathom (17)
- # podcasts (1)
- # polylith (4)
- # portal (14)
- # react (1)
- # reagent (3)
- # reitit (8)
- # releases (3)
- # remote-jobs (1)
- # reveal (7)
- # shadow-cljs (19)
- # sql (16)
- # web-security (3)
I’ve added a new pre-built report state machine for RAD in com.fulcrologic.rad.state-machines.incrementally-loaded-report
. RAD version 1.1.7-1. As the name suggests this machine requires a special resolver that can return the report in segments (limit/offset). It will then load the report rows in chunks to prevent timeouts, and will allow you to render progress (custom rendering) by grabbing the loaded count from raw-loaded-item-count
. See the docstrings in that ns for more details. I don’t have time to document it right now, but thought local users of RAD in here should know it exists, if nothing more than as an example. A resolver that works with it will need to look for query parameters on the load of :report/offset and :report/limit, and return {:report/next-offset n :report/results […]}
where n
is the next offset to pass in (-1 means done).
I was trying to implement it in my project. Glad to see it there. Saves me a lot of time. Thanks a lot.
if you’re using Datomic, you’ll probably need a composite tuple to implement that efficiently, since index-pull can do offsets well, and a composite can group together the things you care about.
A more advanced version of this could be written that accepts filter/sort parameters so that you can support a complete server-side pagination, but that was not my immediate need. This one just loads things in chunks to prevent network timeouts and give better user feedback. All results are still pre-loaded then paginated/processed client-side.