Fork me on GitHub
#sql
<
2020-04-10
>
dcj00:04:21

I am doing (extend-protocol result-set/ReadableColumn and for the datatype I am extending I typically implement both read-column-by-label and read-column-by-index but for my current task I don't think I can implement read-column-by-label as it doesn't have the info I need (both the index and the result-set metadata). How do I handle this? Just not implement by-label?

seancorfield01:04:08

Just make it return the value -- like the default implementation.

thanks3 4
seancorfield01:04:29

But bear in mind that plan will not convert that datatype since that's where read-column-by-label is used @dcj

seancorfield20:04:18

I'm getting close to cutting a new release of next.jdbc so I'd appreciate a few eyeballs on this new section of the docs https://github.com/seancorfield/next-jdbc/blob/master/doc/tips-and-tricks.md#handling-timeouts to catch any obvious mistakes before I publish it as part of the new release.

seancorfield20:04:53

This section is also new https://github.com/seancorfield/next-jdbc/blob/master/doc/getting-started.md#processing-database-metadata (but it's really just a slightly expanded version of what was already in the clojure.java.jdbc migration docs)

seancorfield21:04:20

seancorfield/next.jdbc {:mvn/version "1.0.424"} -- mostly documentation updates, but also :return-keys allows either strings or keywords now, and the reified DataSource object now supports .getLoginTimeout/`.setLoginTimeout`. https://github.com/seancorfield/next-jdbc

👍 16
parrot 4