Back

as-maps-adapter (clj)

(source)

function

(as-maps-adapter builder-fn column-reader)
Given a map builder function (e.g., `as-lower-maps`) and a column reading function, return a new builder function that uses that column reading function instead of `.getObject` so you can override the default behavior. The default column-reader behavior would be equivalent to: (defn default-column-reader [^ResultSet rs ^ResultSetMetaData rsmeta ^Integer i] (.getObject rs i)) Your column-reader can use the result set metadata to determine whether to call `.getObject` or some other method to read the column's value. `read-column-by-index` is still called on the result of that read. Note: this is different behavior to `builder-adapter`'s `column-by-index-fn`.

Examples