(compile sql)
(compile sql opts)
Given a SQL String and optional options, compiles a query into an effective
function of connection ?params -> results
. Accepts the following options:
key | description |
---|---|
:row | Optional function of rs->value or a RowCompiler to convert rows into values |
:key | Optional function of rs-meta i->key to create key for map-results |
:connection | Optional database connection to extract rs-meta at query compile time |
:params | Optional parameters for extracting rs-meta at query compile time |
Given a SQL String and optional options, compiles a query into an effective function of `connection ?params -> results`. Accepts the following options: | key | description | | --------------|-------------| | `:row` | Optional function of `rs->value` or a [[RowCompiler]] to convert rows into values | `:key` | Optional function of `rs-meta i->key` to create key for map-results | `:connection` | Optional database connection to extract rs-meta at query compile time | `:params` | Optional parameters for extracting rs-meta at query compile time
(compile-batch sql)
(compile-batch sql opts)
Given a SQL String and optional options, compiles a query into an effective batching
function of connection callback ?params
, which calls the callback
argument for each full
(and the final maybe not full) batch of results.
Accepts the following options:
key | description |
---|---|
:row | Optional function of rs->value or a RowCompiler to convert rows into values |
:key | Optional function of rs-meta i->key to create key for map-results |
:size | Optional size of the batch (default 100) |
:connection | Optional database connection to extract rs-meta at query compile time |
:params | Optional parameters for extracting rs-meta at query compile time |
Given a SQL String and optional options, compiles a query into an effective batching function of `connection callback ?params`, which calls the `callback` argument for each full (and the final maybe not full) batch of results. Accepts the following options: | key | description | | --------------|-------------| | `:row` | Optional function of `rs->value` or a [[RowCompiler]] to convert rows into values | `:key` | Optional function of `rs-meta i->key` to create key for map-results | `:size` | Optional size of the batch (default 100) | `:connection` | Optional database connection to extract rs-meta at query compile time | `:params` | Optional parameters for extracting rs-meta at query compile time
(create-query)
(create-query {:keys [row key] :or {key (unqualified-key)}})
Creates a memoizing query function accepting the following options:
key | description |
---|---|
:row | Optional function of rs->value or a RowCompiler to convert rows into values |
:key | Optional function of rs-meta i->key to create key for map-results |
Creates a memoizing query function accepting the following options: | key | description | | --------------|-------------| | `:row` | Optional function of `rs->value` or a [[RowCompiler]] to convert rows into values | `:key` | Optional function of `rs-meta i->key` to create key for map-results
(query connection sqlvec)
(query connection sqlvec opts)
Creates and executes a query, accepting the following options:
key | description |
---|---|
:row | Optional function of rs->value or a RowCompiler to convert rows into values |
:key | Optional function of rs-meta i->key to create key for map-results |
Creates and executes a query, accepting the following options: | key | description | | --------------|-------------| | `:row` | Optional function of `rs->value` or a [[RowCompiler]] to convert rows into values | `:key` | Optional function of `rs-meta i->key` to create key for map-results
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close