Fork me on GitHub
#sql
<
2022-12-21
>
theequalizer7317:12:40

Hi Friends, I’m using (assoc jdbc/snake-kebab-opts :builder-fn rs/as-unqualified-kebab-maps) as opts with next.jdbc but there’s one column with a number s3-output that’s being converted to s_3_output and consequently failing. How can I override the csk/->snake-case to include a :separator \- and finally get my s3_output column name correctly ?

seancorfield17:12:32

Write your own builder (that may leverage CSK).

seancorfield17:12:16

Why are you assoc'ing into the qualified opts when there's already unqualified-snake-kebab-opts BTW?

1
seancorfield17:12:49

They're identical except for the :builder-fn so the latter is equivalent to what you're doing: https://github.com/seancorfield/next-jdbc/blob/develop/src/next/jdbc.clj#L443-L457

seancorfield17:12:23

Here's as-unqualified-kebab-maps https://github.com/seancorfield/next-jdbc/blob/develop/src/next/jdbc/result_set.clj#L278-L282 so you'd want a builder like that except with a different :label-fn used.

theequalizer7317:12:05

Thanks @U04V70XH6 Let me take a look.