apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronen Mizrahi <ro...@tversity.com>
Subject Re: [PATCH]: Introduce apr_dbd_transaction_rollback
Date Fri, 28 Apr 2006 18:48:51 GMT
To add to that, the logic of ANY commit operation not just APR's 
end_transaction() is to commit a successful transaciton and rollback if 
an error occurs. This is what commit does by definition and it has 
nothing to do with an applicative decision to rollback the transaction 
which happens in case of an applicative error and not database error.

Ronen Mizrahi wrote:

> In my opinion two separate functions, one for commit and one for 
> rollback will be better and produce more readable code for the 
> application. I am not aware of a single DB API out there that combines 
> these two operations into one function. This does not mean it does not 
> exist of-course, however it does suggest that using one function is 
> somewhat unusual and probably undesirable.
> Nick Kew wrote:
>> On Friday 28 April 2006 05:57, Bojan Smojver wrote:
>>> This was never compiled, let alone tested. It is here as a prototype
>>> for Ronen's suggestion.
>> Hmmm.  Not too keen on this.
>> The original logic of APR end transaction is that it'll commit a
>> successful transaction otr rollback one where an error occurred.
>> What's missing is the option to rollback even when successful.
>> In principle, a "rollback" argument to transaction_end would be
>> a better way to accomplish this.  What level of version bump would
>> we need to introduce that?

View raw message