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

Brady Eidson beidson at apple.com
Thu Oct 25 16:43:27 PDT 2007


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




More information about the whatwg mailing list