aboutsummaryrefslogtreecommitdiff
path: root/sql-api.html
diff options
context:
space:
mode:
Diffstat (limited to 'sql-api.html')
-rw-r--r--sql-api.html66
1 files changed, 37 insertions, 29 deletions
diff --git a/sql-api.html b/sql-api.html
index 32483c59..0495e622 100644
--- a/sql-api.html
+++ b/sql-api.html
@@ -177,7 +177,7 @@ See clojure.contrib.sql.test for an example</pre>
<pre id="var-usage">Usage: (connection)
</pre>
<pre id="var-docstr">Returns the current database connection (or throws if there is none)</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L32" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L32" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -190,7 +190,7 @@ specs. Each spec is either a column spec: a vector containing a column
name and optionally a type and other constraints, or a table-level
constraint: a vector containing words that express the constraint. All
words used to describe the table may be supplied as strings or keywords.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L101" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L105" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -201,7 +201,7 @@ words used to describe the table may be supplied as strings or keywords.</pre>
<pre id="var-docstr">Deletes rows from a table. where-params is a vector containing a string
providing the (optionally parameterized) selection criteria followed by
values for any parameters.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L155" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L159" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -210,7 +210,7 @@ values for any parameters.</pre>
<pre id="var-usage">Usage: (do-commands &amp; commands)
</pre>
<pre id="var-docstr">Executes SQL commands on the open database connection.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L79" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L83" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -221,7 +221,7 @@ values for any parameters.</pre>
<pre id="var-docstr">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.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L88" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L92" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -231,7 +231,7 @@ the parameters.</pre>
</pre>
<pre id="var-docstr">Drops a table on the open database connection given its name, a string
or keyword</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L117" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L121" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -240,7 +240,7 @@ or keyword</pre>
<pre id="var-usage">Usage: (find-connection)
</pre>
<pre id="var-docstr">Returns the current database connection (or nil if there is none)</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L31" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L31" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -250,7 +250,7 @@ or keyword</pre>
</pre>
<pre id="var-docstr">Inserts records into a table. records are maps from strings or
keywords (identifying columns) to values.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L148" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L152" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -260,7 +260,7 @@ keywords (identifying columns) to values.</pre>
</pre>
<pre id="var-docstr">Inserts complete rows into a table. Each row is a vector of values for
each of the table's columns in order.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L142" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L146" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -273,7 +273,7 @@ column-names is a vector of strings or keywords identifying columns. Each
value-group is a vector containing a values for each column in
order. When inserting complete rows (all columns), consider using
insert-rows instead.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L124" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L128" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -283,7 +283,7 @@ insert-rows instead.</pre>
</pre>
<pre id="var-docstr">Returns true if the outermost transaction will rollback rather than
commit when complete</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L73" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L77" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -293,7 +293,7 @@ commit when complete</pre>
</pre>
<pre id="var-docstr">Marks the outermost transaction such that it will rollback rather than
commit when complete</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L67" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L71" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -308,7 +308,7 @@ evaluating the outermost body, or rolled back on any uncaught
exception. If set-rollback-only is called within scope of the outermost
transaction, the entire transaction will be rolled back rather than
committed when complete.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L56" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L60" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -321,7 +321,7 @@ existing row matches the selection criteria. where-params is a vector
containing a string providing the (optionally parameterized) selection
criteria followed by values for any parameters. record is a map from
strings or keywords (identifying columns) to updated values.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L180" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L184" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -333,7 +333,7 @@ strings or keywords (identifying columns) to updated values.</pre>
containing a string providing the (optionally parameterized) selection
criteria followed by values for any parameters. record is a map from
strings or keywords (identifying columns) to updated values.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L166" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L170" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -345,6 +345,10 @@ strings or keywords (identifying columns) to updated values.</pre>
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:
:classname (required) a String, the jdbc driver class name
:subprotocol (required) a String, the jdbc subprotocol
@@ -359,7 +363,7 @@ DataSource:
JNDI:
:name (required) a String or javax.naming.Name
:environment (optional) a java.util.Map</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L34" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L34" id="var-source">Source</a>
</div><div id="var-entry">
<br />
<hr />
@@ -371,7 +375,7 @@ JNDI:
results. sql-params is a vector containing a string providing
the (optionally parameterized) SQL query followed by values for any
parameters.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/5b826a3e8315cbb7fbcb5c6b1d83c74cf6dc66d1/src/clojure/contrib/sql.clj#L193" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql.clj#L197" id="var-source">Source</a>
</div>
<div><h2 id="namespace-name">sql.internal</h2>
<pre id="namespace-docstr"></pre>
@@ -383,7 +387,7 @@ parameters.</pre>
<pre id="var-usage">Usage: (connection*)
</pre>
<pre id="var-docstr">Returns the current database connection (or throws if there is none)</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L38" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L38" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.sql.internal/find-connection*">find-connection*</h2>
@@ -391,16 +395,20 @@ parameters.</pre>
<pre id="var-usage">Usage: (find-connection*)
</pre>
<pre id="var-docstr">Returns the current database connection (or nil if there is none)</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L33" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L33" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.sql.internal/get-connection">get-connection</h2>
<span id="var-type">function</span><br />
- <pre id="var-usage">Usage: (get-connection {:keys [classname subprotocol subname datasource username password name environment], :as db-spec})
+ <pre id="var-usage">Usage: (get-connection {:keys [factory classname subprotocol subname datasource username password name environment], :as db-spec})
</pre>
<pre id="var-docstr">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
@@ -415,7 +423,7 @@ DataSource:
JNDI:
:name (required) a String or javax.naming.Name
:environment (optional) a java.util.Map</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L51" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L51" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.sql.internal/print-sql-exception">print-sql-exception</h2>
@@ -423,7 +431,7 @@ JNDI:
<pre id="var-usage">Usage: (print-sql-exception stream exception)
</pre>
<pre id="var-docstr">Prints the contents of an SQLException to stream</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L100" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L107" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.sql.internal/print-sql-exception-chain">print-sql-exception-chain</h2>
@@ -431,7 +439,7 @@ JNDI:
<pre id="var-usage">Usage: (print-sql-exception-chain stream exception)
</pre>
<pre id="var-docstr">Prints a chain of SQLExceptions to stream</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L114" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L121" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.sql.internal/print-update-counts">print-update-counts</h2>
@@ -439,7 +447,7 @@ JNDI:
<pre id="var-usage">Usage: (print-update-counts stream exception)
</pre>
<pre id="var-docstr">Prints the update counts from a BatchUpdateException to stream</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L122" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L129" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.sql.internal/rollback">rollback</h2>
@@ -448,7 +456,7 @@ JNDI:
(rollback val)
</pre>
<pre id="var-docstr">Accessor for the rollback flag on the current connection</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L44" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L44" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.sql.internal/throw-rollback">throw-rollback</h2>
@@ -456,7 +464,7 @@ JNDI:
<pre id="var-usage">Usage: (throw-rollback e)
</pre>
<pre id="var-docstr">Sets rollback and throws a wrapped exception</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L131" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L138" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.sql.internal/transaction*">transaction*</h2>
@@ -470,7 +478,7 @@ 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.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L137" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L144" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.sql.internal/with-connection*">with-connection*</h2>
@@ -479,7 +487,7 @@ complete.</pre>
</pre>
<pre id="var-docstr">Evaluates func in the context of a new connection to a database then
closes the connection.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L91" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L98" id="var-source">Source</a>
</div><div id="var-entry">
<hr />
<h2 id="clojure.contrib.sql.internal/with-query-results*">with-query-results*</h2>
@@ -489,7 +497,7 @@ closes the connection.</pre>
<pre id="var-docstr">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.</pre>
- <a href="http://github.com/richhickey/clojure-contrib/blob/47fefa28e235e5fcd0377e1bd930eb05a6a9d23b/src/clojure/contrib/sql/internal.clj#L171" id="var-source">Source</a>
+ <a href="http://github.com/richhickey/clojure-contrib/blob/be33acd87f190d9ec2ad756d8cb31c88abca7e5f/src/clojure/contrib/sql/internal.clj#L178" id="var-source">Source</a>
</div>
</div><div><h2 id="namespace-name">sql.test</h2>
<pre id="namespace-docstr"></pre>