The default keyword naming strategy is to lowercase the entity.
The default keyword naming strategy is to lowercase the entity.
The default entity naming strategy is to do nothing.
The default entity naming strategy is to do nothing.
Configuration option, can be set to :default or :mysql-streaming
Configuration option, can be set to :default or :mysql-streaming
(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.
(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.
(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.
(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.
(connection*)
Returns the current database connection (or throws if there is none)
Returns the current database connection (or throws if there is none)
(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).
(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.
(find-connection*)
Returns the current database connection (or nil if there is none)
Returns the current database connection (or nil if there is none)
(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
(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.
(rollback)
(rollback val)
Accessor for the rollback flag on the current connection
Accessor for the rollback flag on the current connection
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close