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

[whatwg] SQL API and changeVersion() with no callbacks

From: Brady Eidson <beidson@apple.com>
Date: Thu, 25 Oct 2007 16:43:27 -0700
Message-ID: <5B7E6667-3B73-42C8-A802-A8F5D8E375E3@apple.com>

On Oct 25, 2007, at 3:53 PM, Ian Hickson wrote:

> On Thu, 25 Oct 2007, Brady Eidson wrote:
>>
>> One of the changeVersion variants is -
>>
>> void changeVersion(in DOMString oldVersion, in DOMString newVersion);
>>
>> This allows an asynchronous version change with no way at all to
>> determine success or failure of the operation.
>>
>> I'm just curious what the motivation is.  Is it necessary to support
>> this?
>
> I added it for the same reason we have executeSql() with no  
> callbacks. I
> can remove it if desired. I expected it to be used in cases where  
> you want
> to change the version (e.g. from '' to '1.0') without changing the  
> schema,
> but where you simply don't really have any good thing to do if it goes
> wrong. I can remove it if you don't think it'll be important, but  
> then we
> might as well remove the one with just the first callback, since I can
> definitely see use cases for changing the version number without doing
> anything else.

For the sake of simplicity in the API, I see no reason why there  
couldn't be a single version of changeVersion() with the 2 strings and  
2 callbacks.  Then if a user truly wanted to call changeVersion() but  
wasn't interested in the results, they could just pass null for both  
of the callbacks.  I suppose the same could be said about executeSql().

But that might go against some DOM'ey or Javascript'ey convention that  
I'm not familiar with.

I don't feel all too strongly about this.

Thanks,
~Brady
Received on Thursday, 25 October 2007 16:43:27 UTC

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