Liking cljdoc? Tell your friends :D

porsas.core


compileclj

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

Returns a [[CompiledQueries]] record containing query functions of type Connection sql-vec => result. The following functions are compiled:

keydescription
:queryreturns a vector of results
:query-onereturns a single results (or nil)

The function 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
Returns a [[CompiledQueries]] record containing query functions of type
`Connection sql-vec => result`. The following functions are compiled:

| key           | description |
| --------------|-------------|
| `:query`      | returns a vector of results
| `:query-one`  | returns a single results (or nil)

The function 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
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 compiled 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 compiled 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

query-oneclj

(query-one connection sqlvec)
(query-one connection sqlvec opts)

Creates and executes a compiled query-one, 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 compiled query-one, 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