Fork me on GitHub
#sql
<
2021-06-14
>
jmayaalv17:06:40

Hi, i am trying to serialize a row loaded witn next.jdbc with transit and i am getting the following (i need to serialize the metadata)

Caused by: java.lang.RuntimeException: java.lang.Exception: Not supported: class next.jdbc.result_set$navize_row$fn__25001
	at com.cognitect.transit.impl.WriterFactory$1.write(WriterFactory.java:65)
I am guessing because of the nav that execute! adds to the protocols.

jmayaalv17:06:54

has anybody faced something similar? any suggestions?

seancorfield18:06:22

@jmayaalv Is there an option on Transit to ignore metadata?

seancorfield18:06:28

(I’ve never used Transit)

jmayaalv18:06:36

Transit doesn't serialize metadata as default but in this case I have to do. I think I'll just remove the Nav stuff from it. Thanks a lot

seancorfield18:06:10

@jmayaalv Each row has quite a bit of metadata for implementing protocols, but mapping over the result set vector and just doing (vary-metadata row (constantly nil)) should work.