Created
July 26, 2012 16:39
-
-
Save anonymous/3183120 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=> (doc clojure.java.jdbc/with-connection) | |
------------------------- | |
clojure.java.jdbc/with-connection | |
([db-spec & body]) | |
Macro | |
Evaluates body in the context of a new connection to a database then | |
closes the connection. 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: | |
:subprotocol (required) a String, the jdbc subprotocol | |
:subname (required) a String, the jdbc subname | |
:classname (optional) a String, the jdbc driver class name | |
(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 | |
nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment