Yes, that should be fine. One note about your sample code: the isolation
mode of inner transactions must be #f (the default); you can't change
isolation levels once you've started an outer transaction. Also keep in
mind that nested transactions are not supported for ODBC connections.
Ryan
On 06/22/2015 05:05 AM, George Neuner wrote:
Hi all,
I have what I hope is a quick question. WIth appropriate care to pair
start and commit/rollback, is it safe to use call-with-transaction and
start-transaction together?
e.g.,
(call-with-transaction dbc
(lambda ()
:
(start-transaction dbc #:isolation 'serializable)
:
(if (needs-rollback? dbc)
(rollback-transaction dbc)
(commit-transaction dbc))
:
) #:isolation 'read-committed )
or the reverse:
(start-transaction dbc #:isolation 'repeatable-read)
:
(call-with-transaction dbc
(lambda ()
:
) #:isolation 'serializable)
:
(if (needs-rollback? dbc)
(rollback-transaction dbc)
(commit-transaction dbc))
I am adding functionality involving sub-transactions to an existing code
base that uses call-with-transaction pretty much exclusively and I'm
hoping not to have to change the existing framework.
Thanks,
George
--
You received this message because you are subscribed to the Google
Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to racket-users+unsubscr...@googlegroups.com
<mailto:racket-users+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.