Re: [Patch] Update view-database only if the transaction succeeded

"Saurabh Nanda" <[email protected]> Thu, 13 Sep 2007 01:13:57 +0530
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
> > +          (if (and (in-transaction-p :database database)
> > +                   (boundp '*transaction-insert-list*))
>
> Rather than relying on the bound status of the variable, can't you
> just check if in-transaction-p (and initialize the variable value to
> nil)?

No. I thought of that. *transaction-insert-list* is bound only when
you're using the with-transaction macro. However, someone may use
start-transaction/commit/rollback separately which is going to break
everything. If and only if the dynamic context for
*transaction-insert-list* is set, should we push objects into it.

Saurabh.
-- 
http://nandz.blogspot.com
http://foodieforlife.blogspot.com