[whatwg] SQL API - SQLTransactionErrorCallback

Brady Eidson beidson at apple.com
Mon Oct 29 15:51:24 PDT 2007


On Oct 29, 2007, at 3:37 PM, Ian Hickson wrote:

> On Mon, 29 Oct 2007, Brady Eidson wrote:
>>
>> A SQLTransactionErrorCallback object has a single method: boolean
>> handleEvent(in SQLError error);
>>
>> This method is meant for both notifying of a failure in the  
>> transaction
>> as well as for deciding it's fate - should we commit what we have, or
>> just roll it back? However, there's one problem - how does the script
>> and it's SQLTransactionErrorCallback know which transaction is in
>> question?
>>
>> I propose we change SQLTransactionErrorCallback.handleEvent() to have
>> the same signature as the SQLStatementErrorCallback, which is:  
>> boolean
>> handleEvent(in SQLTransaction transaction, in SQLError error);
>
> Actually I specifically didn't include the transaction because I  
> can't see
> what you could do with it. You know which transaction it is, it's  
> the one
> to which you are passing the method.

Why can't a developer have a global transaction error callback they  
use for multiple transactions, including the possibility of  
transactions from more than one database at a time?  No rule prevents  
this.

Thanks,
~Brady




More information about the whatwg mailing list