Fork me on GitHub
#sql
<
2019-06-17
>
kostafey19:06:07

Hi all! :row-fn of query produces connection closed error if :as-arrays? set to true.

kostafey20:06:12

I use :row-fn for java.sql.Clob to String conversion. If :as-arrays? is false, it works well.

seancorfield20:06:21

@kostafey Can you put a small example, using one of the embedded DBs, up on GitHub for me to look at that code?

seancorfield20:06:02

Are you also providing :result-set-fn in your code? If so, what are you passing there?

seancorfield20:06:18

The default :result-set-fn for :as-arrays? true is vec which is eager and should force realization of the row values, regardless of :row-fn. But if you're passing in :result-set-fn, you're overriding the default and if you pass in something that doesn't eagerly realize the whole result set, you would get that error.