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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to