From 81743f1484e25dcd7ccb9e78e25478b119b4f30f Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Wed, 26 Feb 2020 11:56:08 -0800 Subject: [PATCH] Address #92 by repeating transaction/connection note --- CHANGELOG.md | 2 +- doc/transactions.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5604dea..409a738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Only accretive/fixative changes will be made from now on. The following changes have been committed to the **master** branch since the 1.0.13 release: * Add PostgreSQL streaming option information to **Tips & Tricks**. -* Minor documentation fixes. +* Minor documentation fixes (including #92). * Improve `Unknown dbtype` exception message (to clarify that `:classname` is also missing). * Fix #88 by using 1-arity `keyword` call when table name unavailable (or `:qualifier-fn` returns `nil` or an empty string); also allows `:qualifier-fn` function to be called on empty table name (so `:qualifier-fn (constantly "qual")` will now work much like `clojure.java.jdbc`'s `:qualifier "qual"` worked). * Address #89, #91 by making minor performance tweaks to `next.jdbc.result-set` functions. diff --git a/doc/transactions.md b/doc/transactions.md index d18ed51..173f5d0 100644 --- a/doc/transactions.md +++ b/doc/transactions.md @@ -25,6 +25,8 @@ It is possible to tell `next.jdbc` to create connections that do not automatical (jdbc/execute! tx ...)) ``` +If `with-transaction` is given a datasource, it will create and close the connection for you. If you pass in an existing connection, `with-transaction` will set up a transaction on that connection and, after either committing or rolling back the transaction, will restore the state of the connection and leave it open. + You can also provide an options map as the third element of the binding vector (or the third argument to the `transact` function). The following options are supported: * `:isolation` -- the isolation level for this transaction (see [All The Options](/doc/all-the-options.md) for specifics),