Liking cljdoc? Tell your friends :D

clojure.java.jdbc.internal


*as-key*clj

The default keyword naming strategy is to lowercase the entity.

The default keyword naming strategy is to lowercase the entity.
sourceraw docstring

*as-str*clj

The default entity naming strategy is to do nothing.

The default entity naming strategy is to do nothing.
sourceraw docstring

*db*clj

source

*statement-mode*clj

Configuration option, can be set to :default or :mysql-streaming

Configuration option, can be set to :default or :mysql-streaming
sourceraw docstring

as-identifier*clj

(as-identifier* x)
(as-identifier* x f-entity)

Given a keyword, convert it to a string using the current naming strategy. Given a string, return it as-is.

Given a keyword, convert it to a string using the current naming
strategy.
Given a string, return it as-is.
sourceraw docstring

as-keyclj

(as-key f x)

Given a naming strategy and a string, return the string as a keyword per that naming strategy. Given (a naming strategy and) a keyword, return it as-is.

Given a naming strategy and a string, return the string as a
keyword per that naming strategy. Given (a naming strategy and)
a keyword, return it as-is.
sourceraw docstring

as-keyword*clj

(as-keyword* x)
(as-keyword* x f-keyword)

Given an entity name (string), convert it to a keyword using the current naming strategy. Given a keyword, return it as-is.

Given an entity name (string), convert it to a keyword using the
current naming strategy.
Given a keyword, return it as-is.
sourceraw docstring

as-strclj

(as-str f x)

Given a naming strategy and a keyword, return the keyword as a string per that naming strategy. Given (a naming strategy and) a string, return it as-is.

Given a naming strategy and a keyword, return the keyword as a
string per that naming strategy. Given (a naming strategy and)
a string, return it as-is.
sourceraw docstring

connection*clj

(connection*)

Returns the current database connection (or throws if there is none)

Returns the current database connection (or throws if there is none)
sourceraw docstring

do-prepared*clj

(do-prepared* sql & param-groups)

Executes an (optionally parameterized) SQL prepared statement on the open database connection. Each param-group is a seq of values for all of the parameters. Return a seq of update counts (one count for each param-group).

Executes an (optionally parameterized) SQL prepared statement on the
open database connection. Each param-group is a seq of values for all of
the parameters.
Return a seq of update counts (one count for each param-group).
sourceraw docstring

do-prepared-return-keys*clj

(do-prepared-return-keys* sql & param-groups)

Executes an (optionally parameterized) SQL prepared statement on the open database connection. Each param-group is a seq of values for all of the parameters. Return the generated keys for the (single) update/insert.

Executes an (optionally parameterized) SQL prepared statement on the
open database connection. Each param-group is a seq of values for all of
the parameters.
Return the generated keys for the (single) update/insert.
sourceraw docstring

find-connection*clj

(find-connection*)

Returns the current database connection (or nil if there is none)

Returns the current database connection (or nil if there is none)
sourceraw docstring

get-connectionclj

(get-connection {:keys [factory classname subprotocol subname datasource
                        username password name environment]
                 :as db-spec})

Creates a connection to a database. db-spec is a map containing values for one of the following parameter sets:

Factory: :factory (required) a function of one argument, a map of params (others) (optional) passed to the factory function in a map

DriverManager: :classname (required) a String, the jdbc driver class name :subprotocol (required) a String, the jdbc subprotocol :subname (required) a String, the jdbc subname (others) (optional) passed to the driver as properties.

DataSource: :datasource (required) a javax.sql.DataSource :username (optional) a String :password (optional) a String, required if :username is supplied

JNDI: :name (required) a String or javax.naming.Name :environment (optional) a java.util.Map

Creates a connection to a database. db-spec is a map containing values
for one of the following parameter sets:

Factory:
  :factory     (required) a function of one argument, a map of params
  (others)     (optional) passed to the factory function in a map

DriverManager:
  :classname   (required) a String, the jdbc driver class name
  :subprotocol (required) a String, the jdbc subprotocol
  :subname     (required) a String, the jdbc subname
  (others)     (optional) passed to the driver as properties.

DataSource:
  :datasource  (required) a javax.sql.DataSource
  :username    (optional) a String
  :password    (optional) a String, required if :username is supplied

JNDI:
  :name        (required) a String or javax.naming.Name
  :environment (optional) a java.util.Map
sourceraw docstring

prepare-statementclj

(prepare-statement sql)
source

resultset-seq*clj

(resultset-seq* rs)

Creates and returns a lazy sequence of structmaps corresponding to the rows in the java.sql.ResultSet rs. Based on clojure.core/resultset-seq but it respects the current naming strategy.

Creates and returns a lazy sequence of structmaps corresponding to
the rows in the java.sql.ResultSet rs. Based on clojure.core/resultset-seq
but it respects the current naming strategy.
sourceraw docstring

rollbackclj

(rollback)
(rollback val)

Accessor for the rollback flag on the current connection

Accessor for the rollback flag on the current connection
sourceraw docstring

special-countsclj

source

transaction*clj

(transaction* func)

Evaluates func as a transaction on the open database connection. Any nested transactions are absorbed into the outermost transaction. By default, all database updates are committed together as a group after evaluating the outermost body, or rolled back on any uncaught exception. If rollback is set within scope of the outermost transaction, the entire transaction will be rolled back rather than committed when complete.

Evaluates func as a transaction on the open database connection. Any
nested transactions are absorbed into the outermost transaction. By
default, all database updates are committed together as a group after
evaluating the outermost body, or rolled back on any uncaught
exception. If rollback is set within scope of the outermost transaction,
the entire transaction will be rolled back rather than committed when
complete.
sourceraw docstring

with-connection*clj

(with-connection* db-spec func)

Evaluates func in the context of a new connection to a database then closes the connection.

Evaluates func in the context of a new connection to a database then
closes the connection.
sourceraw docstring

with-query-results*clj

(with-query-results* [sql & params :as sql-params] func)

Executes a query, then evaluates func passing in a seq of the results as an argument. The first argument is a vector containing the (optionally parameterized) sql query string followed by values for any parameters.

Executes a query, then evaluates func passing in a seq of the results as
an argument. The first argument is a vector containing the (optionally
parameterized) sql query string followed by values for any parameters.
sourceraw docstring

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

× close