Liking cljdoc? Tell your friends :D

porsas.core


compileclj

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

keydescription
:rowOptional function of rs->value or a RowCompiler to convert rows into values
:keyOptional function of rs-meta i->key to create key for map-results
:connectionOptional database connection to extract rs-meta at query compile time
:paramsOptional 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
sourceraw docstring

compile-batchclj

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

keydescription
:rowOptional function of rs->value or a RowCompiler to convert rows into values
:keyOptional function of rs-meta i->key to create key for map-results
:sizeOptional size of the batch (default 100)
:connectionOptional database connection to extract rs-meta at query compile time
:paramsOptional 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
sourceraw docstring

create-queryclj

(create-query)
(create-query {:keys [row key] :or {key (unqualified-key)}})

Creates a memoizing query function accepting the following options:

keydescription
:rowOptional function of rs->value or a RowCompiler to convert rows into values
:keyOptional 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
sourceraw docstring

GetConnectioncljprotocol

get-connectionclj

(get-connection this)
source

qualified-keyclj

(qualified-key)
(qualified-key f)
(qualified-key ft fc)
source

queryclj

(query connection sqlvec)
(query connection sqlvec opts)

Creates and executes a query, accepting the following options:

keydescription
:rowOptional function of rs->value or a RowCompiler to convert rows into values
:keyOptional 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
sourceraw docstring

RowCompilercljprotocol

compile-rowclj

(compile-row this cols)
source

rs->compiled-recordclj

(rs->compiled-record)
(rs->compiled-record _)
source

rs->mapclj

(rs->map)
(rs->map _)
source

rs->recordclj

(rs->record record)
source

SQLAndParamscljprotocol

get-paramsclj

(get-params this)

get-sqlclj

(get-sql this)
source

unqualified-keyclj

(unqualified-key)
(unqualified-key f)
source

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

× close