sql

adamfrey 2023-05-30T13:40:24.706839Z

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 🙂

seancorfield 2023-05-30T16:23:27.557869Z

Pretty sure the answer is "no". What's your reason?

adamfrey 2023-05-30T16:30:05.934249Z

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

seancorfield 2023-05-30T16:44:14.290249Z

That's a problem in general with metadata and serialization: solve it in your serialization code, not in next.jdbc.

seancorfield 2023-05-30T16:46:35.535889Z

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?)