On Aug 13, 11:23 pm, Shantanu Kumar <kumar.shant...@gmail.com> wrote:
>
> As far I understand, transactions belong to the user. The user should
> decide what to execute under which transaction. By beginning
> transaction inside these functions, is it assumed that the user can
> wrap bigger constructs under her own transactions and that the JDBC
> driver would support nested transactions?

I'm unsure of why clojure.contrib.sql does start transactions without
documenting them but it is a lot smarter than it first appears. My
understanding is that JDBC relies on the underlying database to
support nested transactions. However, clojure.contrib.sql supports
nested transactions on all databases by keeping a count of the level
of nesting and only executing a database transaction at the outer
level.

http://github.com/richhickey/clojure-contrib/blob/6a0483d9e216ca00fc648a4b3673996b76a2785a/src/main/clojure/clojure/contrib/sql/internal.clj#L144

I don't know if this is an ideal thing to  do but my own modest, not
mission critical, use of it has not run into any problems.

Saul

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to