W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2007

[whatwg] SQL API - SQLTransactionErrorCallback

From: Brady Eidson <beidson@apple.com>
Date: Mon, 29 Oct 2007 15:51:24 -0700
Message-ID: <AED1FA47-0514-469D-82A9-A69B003A60E5@apple.com>
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  

Received on Monday, 29 October 2007 15:51:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:37 UTC