W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2008

[whatwg] Database feedback

From: Chris Prince <cprince@google.com>
Date: Wed, 26 Nov 2008 10:48:19 -0800
Message-ID: <cd580da00811261048q15c699e1ge0421a7aca90785e@mail.gmail.com>
> On Mon, 26 May 2008, Chris Prince wrote:
>>
>> // On the 1st call, this line means "create a database,
>> // and set the version string to the empty string".
>> var db1 = window.openDatabase("foo", "", "", "");
>>
>> // On the 2nd call, the meaning has changed to
>> // "open the 'foo' database, regardless of the version string".
>> var db2 = window.openDatabase("foo", "", "", "");

On Wed, Nov 26, 2008 at 3:46 AM, Ian Hickson <ian at hixie.ch> wrote:
>
> Yeah, that's a bit confusing. Not sure what to do about it.

Two ideas:

* Perhaps use a different value to mean "open any version, if one
exists".  Using 'null' seems like an obvious candidate.

* Alternately, don't allow the empty string as a valid version string.
 Only use the empty string to mean "open existing".

--Chris
Received on Wednesday, 26 November 2008 10:48:19 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:07 UTC