This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-18
Channels
- # announcements (2)
- # babashka (65)
- # beginners (104)
- # boot (8)
- # calva (23)
- # circleci (3)
- # clj-commons (1)
- # clj-on-windows (3)
- # clojure (43)
- # clojure-europe (45)
- # clojure-france (2)
- # clojure-italy (3)
- # clojure-nl (3)
- # clojure-norway (13)
- # clojure-uk (4)
- # clojurescript (5)
- # core-typed (2)
- # cursive (5)
- # data-science (2)
- # datalevin (10)
- # emacs (38)
- # events (2)
- # fulcro (11)
- # graphql (6)
- # gratitude (2)
- # helix (11)
- # hugsql (3)
- # jobs (2)
- # lsp (17)
- # luminus (1)
- # malli (15)
- # missionary (3)
- # nrepl (6)
- # off-topic (6)
- # pedestal (2)
- # portal (16)
- # reagent (33)
- # reitit (4)
- # releases (12)
- # ring (2)
- # sci (3)
- # shadow-cljs (21)
- # spacemacs (7)
- # sql (5)
- # tools-build (36)
- # web-security (2)
Hey. What is the recommended way of converting ResultSet’s rows which are of type next.jdbc.result_set$navize_row$fn
to usual hashmaps? I’m currently trying to cache the ResultSet (returned by next.jdbc/execute!
function) in Redis but it complains about the rows in a ResultSet being of unsupported type..
@lauri That's part of the metadata used to support datafy
/`nav`, not the rows themselves. I think if you do (mapv #(vary-meta % dissoc 'clojure.core.protocols/nav) results)
that should strip the metadata off the rows.
Initially got it working with (mapv #(vary-meta % dissoc 'clojure.core.protocols/datafy) results)
but ended up using (mapv #(into {} %) results)
as it feels a bit cleaner. Thanks again for a quick response!
Or if the machinery you're using to cache to Redis supports a generic way to remove metadata, that would probably be the better approach.