sql

All things SQL and JDBC...
2020-04-10T00:50:21.225600Z

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?

seancorfield 2020-04-10T01:13:08.226100Z

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

1
seancorfield 2020-04-10T01:14:29.227Z

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

seancorfield 2020-04-10T20:14:18.228900Z

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.

seancorfield 2020-04-10T20:15:53.229900Z

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)

seancorfield 2020-04-10T21:45:20.231500Z

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

👍 4
🦜 1