This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-30
Channels
- # announcements (2)
- # babashka (3)
- # beginners (31)
- # biff (3)
- # calva (40)
- # chlorine-clover (2)
- # clerk (5)
- # clj-kondo (10)
- # clojure (13)
- # clojure-art (1)
- # clojure-denver (16)
- # clojure-europe (44)
- # clojure-nl (1)
- # clojure-norway (27)
- # clojure-sweden (3)
- # clojure-uk (1)
- # clojurescript (49)
- # clr (6)
- # community-development (2)
- # datalevin (10)
- # datomic (63)
- # events (2)
- # fulcro (9)
- # holy-lambda (15)
- # honeysql (8)
- # hoplon (6)
- # hyperfiddle (9)
- # introduce-yourself (1)
- # kaocha (1)
- # london-clojurians (2)
- # matrix (1)
- # nbb (7)
- # off-topic (38)
- # polylith (6)
- # re-frame (4)
- # reagent (2)
- # releases (3)
- # sci (13)
- # scittle (5)
- # shadow-cljs (6)
- # sql (5)
- # tools-deps (4)
- # vim (33)
- # web-security (8)
- # xtdb (2)
is there an option I can pass to next.jdbc/execute!
to opt out of attaching the datafy and nav metadata?
I promise that I have a reasonable reason to do this 🙂
Pretty sure the answer is "no". What's your reason?
I was receiving an exception while trying to pass data returned from next.jdbc to a library that was attempting to serialize the data (using Java.io.Serialiazable) including metadata. The navify value didn’t seem to be serializable, the problem went away when I blanked out the response metadata, and I wasn’t using the navify metadata anyway. So I have something that works, but I was wondering if I could just avoid the metadata completely in this scenario
That's a problem in general with metadata and serialization: solve it in your serialization code, not in next.jdbc
.
You could potentially run into it with all sorts of Clojure data. Anything that satisfies protocols via metadata is going to trip up serialization if that serialization doesn't strip metadata (and you have to think about the meaning of the serialize -> deserialize process when metadata is present: should it be dropped unconditionally? Should only some types of metadata be dropped? Should the metadata be encoded and serialized so it can be retrieved when it is deserialized?)