An implementation of ResultSet handling functions.
Defines the following protocols:
DatafiableRow -- for turning a row into something datafiableReadableColumn -- to read column values by label or indexRowBuilder -- for materializing a rowResultSetBuilder -- for materializing a result setAlso provides the default implemenations for Executable and
the default datafy/nav behavior for rows from a result set.
An implementation of `ResultSet` handling functions. Defines the following protocols: * `DatafiableRow` -- for turning a row into something datafiable * `ReadableColumn` -- to read column values by label or index * `RowBuilder` -- for materializing a row * `ResultSetBuilder` -- for materializing a result set Also provides the default implemenations for `Executable` and the default `datafy`/`nav` behavior for rows from a result set.
(as-arrays rs opts)Given a ResultSet and options, return a RowBuilder / ResultSetBuilder
that produces a vector of column names followed by vectors of row values.
Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder` that produces a vector of column names followed by vectors of row values.
(as-lower-arrays rs opts)Given a ResultSet and options, return a RowBuilder / ResultSetBuilder
that produces a vector of lower-case column names followed by vectors of
row values.
Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder` that produces a vector of lower-case column names followed by vectors of row values.
(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.
Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder` that produces bare vectors of hash map rows, with lower-case keys.
(as-maps rs opts)Given a ResultSet and options, return a RowBuilder / ResultSetBuilder
that produces bare vectors of hash map rows.
Given a `ResultSet` and options, return a `RowBuilder` / R`esultSetBuilder` that produces bare vectors of hash map rows.
(as-unqualified-arrays rs opts)Given a ResultSet and options, return a RowBuilder / ResultSetBuilder
that produces a vector of simple column names followed by vectors of row
values.
Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder` that produces a vector of simple column names followed by vectors of row values.
(as-unqualified-lower-arrays rs opts)Given a ResultSet and options, return a RowBuilder / ResultSetBuilder
that produces a vector of simple, lower-case column names followed by
vectors of row values.
Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder` that produces a vector of simple, lower-case column names followed by vectors of row values.
(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.
Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder` that produces bare vectors of hash map rows, with simple, lower-case keys.
(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.
Given a `ResultSet` and options, return a `RowBuilder` / `ResultSetBuilder` that produces bare vectors of hash map rows, with simple keys.
Given a connectable object, return a function that knows how to turn a row
into a datafiable object that can be navigated.
Given a connectable object, return a function that knows how to turn a row into a datafiable object that can be `nav`igated.
(datafiable-row this connectable opts)(get-column-names rsmeta opts)Given ResultSetMetaData, return a vector of column names, each qualified by
the table from which it came.
Given `ResultSetMetaData`, return a vector of column names, each qualified by the table from which it came.
(get-lower-column-names rsmeta opts)Given ResultSetMetaData, return a vector of lower-case column names, each
qualified by the table from which it came.
Given `ResultSetMetaData`, return a vector of lower-case column names, each qualified by the table from which it came.
(get-unqualified-column-names rsmeta opts)Given ResultSetMetaData, return a vector of unqualified column names.
Given `ResultSetMetaData`, return a vector of unqualified column names.
(get-unqualified-lower-column-names rsmeta opts)Given ResultSetMetaData, return a vector of unqualified column names.
Given `ResultSetMetaData`, return a vector of unqualified column names.
Protocol for reading objects from the java.sql.ResultSet. Default
implementations (for Object and nil) return the argument, and the
Boolean implementation ensures a canonicalized true/false value,
but it can be extended to provide custom behavior for special types.
Protocol for reading objects from the `java.sql.ResultSet`. Default implementations (for `Object` and `nil`) return the argument, and the `Boolean` implementation ensures a canonicalized `true`/`false` value, but it can be extended to provide custom behavior for special types.
(read-column-by-index val rsmeta idx)Function for transforming values after reading them via a column index.
Function for transforming values after reading them via a column index.
(read-column-by-label val label)Function for transforming values after reading them via a column label.
Function for transforming values after reading them via a column label.
Protocol for building result sets in various representations:
->rs -- called to create the basis of the result set
with-row -- called with the result set and the row to be added
rs! -- called to finalize the result set once it is complete
Default implementations for building vectors of hash maps and vectors
of column names and row values: MapResultSetBuilder & ArrayResultSetBuilder
Protocol for building result sets in various representations: `->rs` -- called to create the basis of the result set `with-row` -- called with the result set and the row to be added `rs!` -- called to finalize the result set once it is complete Default implementations for building vectors of hash maps and vectors of column names and row values: `MapResultSetBuilder` & `ArrayResultSetBuilder`
(->rs _)(rs! _ rs)(with-row _ rs row)Protocol for building rows in various representations:
->row -- called once per row to create the basis of each row
column-count -- return the number of columns in each row
with-column -- called with the row and the index of the column to be added;
this is expected to read the column value from the ResultSet!
row! -- called once per row to finalize each row once it is complete
The default implementation for building hash maps: MapResultSetBuilder
Protocol for building rows in various representations:
`->row` -- called once per row to create the basis of each row
`column-count` -- return the number of columns in each row
`with-column` -- called with the row and the index of the column to be added;
this is expected to read the column value from the `ResultSet`!
`row!` -- called once per row to finalize each row once it is complete
The default implementation for building hash maps: `MapResultSetBuilder`(->row _)(column-count _)(row! _ row)(with-column _ row i)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |