W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: [IndexedDB] Behavior of IDBObjectStore.get() and IDBObjectStore.delete() when record doesn't exist

From: Keean Schupke <keean@fry-it.com>
Date: Mon, 8 Nov 2010 19:21:32 +0000
Message-ID: <AANLkTi=d-d=BJHBPqMCMGQZw4P+Y+bLhJ9QmKtEo0sX1@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Webapps WG <public-webapps@w3.org>
I was only suggesting this as it makes the operations symmetrical in the
sense that if "get" returns undefined for "key does not exist",
"put(undefined, key)" should mean make this key not exist, in a declarative

For me this is clearer than the alternatives (which may require exceptions
to deal with some cases).

Of course its only a suggestion, and it nobody likes it, feel free to ignore


On 8 November 2010 18:57, Keean Schupke <keean@fry-it.com> wrote:

> Hi,
>> Indeed. But I think this is more unexpected and confusing than having
>> .get() return the same thing if the entry exists as if it contains
>> undefined.
>> / Jonas
> I don't understand that.
> with the proposal, undefined clearly means the entry does not exist as
> there is no way to put an undefined into the object store (as
> .put(undefined, key) deletes the entry).
> Cheers,
> Keean.
Received on Monday, 8 November 2010 19:22:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:13 UTC