(_label->key label)
Convert given string (column) label to keyword after replacing underscores with dashes.
Convert given string (column) label to keyword after replacing underscores with dashes.
(ignore-multi _ _ v)
Handle asphalt.core/fetch-optional-row/value :on-multi event by returning the first value.
Handle asphalt.core/fetch-optional-row/value :on-multi event by returning the first value.
(label->key label)
Convert given string (column) label to keyword.
Convert given string (column) label to keyword.
(letcol binding & body)
Destructure column values in the current row in a java.sql.ResultSet instance. Optional SQL type hints increase accuracy and speed. The date, time and timestamp types accept an additional timezone-string/calendar argument.
Sequential destructuring with implicit column index lookup: (letcol [[^int foo ^string bar [^date baz cal]] result-set] ; cal is TimeZone keyword/string or java.util.Calendar [foo bar baz])
Associative destructuring with implicit column label lookup: (letcol [{:labels [^int foo ^string bar [^date baz cal]] ; cal is TimeZone keyword/string or java.util.Calendar :_labels [^date end-date ^timestamp audit-ts]]} result-set] ;; :_labels turns dash to underscore when looking up by column label: end_date, audit_ts [foo bar baz end-date audit-ts])
Associative destructuring with explicit column reference: (letcol [{^int foo 1 ; column index begins with 1 ^string bar 2 ^boolean baz 3 [^date end-date cal] "end_date" ; cal is TimeZone keyword/string or java.util.Calendar ^timestamp audit-ts "audit_ts"} result-set] [foo bar baz end-date audit-ts])
Destructure column values in the current row in a java.sql.ResultSet instance. Optional SQL type hints increase accuracy and speed. The date, time and timestamp types accept an additional timezone-string/calendar argument. Sequential destructuring with implicit column index lookup: (letcol [[^int foo ^string bar [^date baz cal]] result-set] ; cal is TimeZone keyword/string or java.util.Calendar [foo bar baz]) Associative destructuring with implicit column label lookup: (letcol [{:labels [^int foo ^string bar [^date baz cal]] ; cal is TimeZone keyword/string or java.util.Calendar :_labels [^date end-date ^timestamp audit-ts]]} result-set] ;; :_labels turns dash to underscore when looking up by column label: end_date, audit_ts [foo bar baz end-date audit-ts]) Associative destructuring with explicit column reference: (letcol [{^int foo 1 ; column index begins with 1 ^string bar 2 ^boolean baz 3 [^date end-date cal] "end_date" ; cal is TimeZone keyword/string or java.util.Calendar ^timestamp audit-ts "audit_ts"} result-set] [foo bar baz end-date audit-ts])
(make-column-value-reader result-types column-index)
(make-column-value-reader result-type column-index col-arg)
Given result column type and column index, return a type-aware, efficient value-reading function.
Given result column type and column index, return a type-aware, efficient value-reading function.
(make-columns-reader result-types)
(make-columns-reader result-types col-args)
Given result column types, return a type-aware, efficient columns-reading function.
Given result column types, return a type-aware, efficient columns-reading function.
(nil-on-empty _ _)
Handle asphalt.core/fetch-optional-row/value :on-empty event by returning nil.
Handle asphalt.core/fetch-optional-row/value :on-empty event by returning nil.
(read-column-value result-set column-index)
(read-column-value column-type result-set column-index)
(read-column-value column-type column-arg result-set column-index)
Read column value from java.sql.ResultSet at the specified column index and return it.
Read column value from java.sql.ResultSet at the specified column index and return it.
(read-columns result-set column-count)
(read-columns column-types result-set column-count)
(read-columns column-types column-args result-set column-count)
Read the column values from given java.sql.ResultSet and return as a vector.
Read the column values from given java.sql.ResultSet and return as a vector.
(throw-on-empty sql-source result-set)
Handle :on-empty event in fetch fns by throwing exception.
Handle :on-empty event in fetch fns by throwing exception.
(throw-on-multi sql-source result-set value)
Handle :on-multi event in fetch fns by throwing exception.
Handle :on-multi event in fetch fns by throwing exception.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close