Liking cljdoc? Tell your friends :D

next.jdbc.optional

Builders that treat NULL SQL values as 'optional' and omit the corresponding keys from the Clojure hash maps for the rows.

Builders that treat NULL SQL values as 'optional' and omit the
corresponding keys from the Clojure hash maps for the rows.
raw docstring

as-lower-mapsclj

(as-lower-maps rs opts)

Given a ResultSet and options, return a RowBuilder / ResultSetBuilder that produces bare vectors of hash map rows, with lower-case keys and nil columns omitted.

Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder`
that produces bare vectors of hash map rows, with lower-case keys and nil
columns omitted.
sourceraw docstring

as-mapsclj

(as-maps rs opts)

Given a ResultSet and options, return a RowBuilder / ResultSetBuilder that produces bare vectors of hash map rows, with nil columns omitted.

Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder`
that produces bare vectors of hash map rows, with nil columns omitted.
sourceraw docstring

as-maps-adapterclj

(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.

This adapter omits SQL NULL values.

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, if it is not nil.

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.

This adapter omits SQL NULL values.

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, if
it is not `nil`.
sourceraw docstring

as-modified-mapsclj

(as-modified-maps rs opts)

Given a ResultSet and options, return a RowBuilder / ResultSetBuilder that produces bare vectors of hash map rows, with modified keys and nil columns omitted.

Requires both the :qualifier-fn and :label-fn options.

Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder`
that produces bare vectors of hash map rows, with modified keys and nil
columns omitted.

Requires both the `:qualifier-fn` and `:label-fn` options.
sourceraw docstring

as-unqualified-lower-mapsclj

(as-unqualified-lower-maps rs opts)

Given a ResultSet and options, return a RowBuilder / ResultSetBuilder that produces bare vectors of hash map rows, with simple, lower-case keys and nil columns omitted.

Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder`
that produces bare vectors of hash map rows, with simple, lower-case keys
and nil columns omitted.
sourceraw docstring

as-unqualified-mapsclj

(as-unqualified-maps rs opts)

Given a ResultSet and options, return a RowBuilder / ResultSetBuilder that produces bare vectors of hash map rows, with simple keys and nil columns omitted.

Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder`
that produces bare vectors of hash map rows, with simple keys and nil
columns omitted.
sourceraw docstring

as-unqualified-modified-mapsclj

(as-unqualified-modified-maps rs opts)

Given a ResultSet and options, return a RowBuilder / ResultSetBuilder that produces bare vectors of hash map rows, with simple, modified keys and nil columns omitted.

Requires the :label-fn option.

Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder`
that produces bare vectors of hash map rows, with simple, modified keys
and nil columns omitted.

Requires the `:label-fn` option.
sourceraw docstring

MapResultSetOptionalBuilderclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close