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: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 8 Nov 2010 10:27:13 -0800
Message-ID: <AANLkTi=QS7arbrU2Bc+OQWeY094Tcncop4DPAQW2WHBx@mail.gmail.com>
To: Keean Schupke <keean@fry-it.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Webapps WG <public-webapps@w3.org>
On Mon, Nov 8, 2010 at 10:06 AM, Keean Schupke <keean@fry-it.com> wrote:
> It would make sense if you make setting a key to undefined semantically
> equivalent to deleting the value (and no error if it does not exist), and
> return undefined on a get when no such key exists. That way 'undefined'
> cannot exist as a value in the object store, and is a safe marker for the
> key not existing in that index.

I'm not sure I follow. There is no way to set a key on an existing
entry in an object store. The closest thing would be
IDBCursor.update(), but it specifically disallow changing the key at

/ Jonas
Received on Monday, 8 November 2010 18:28:12 UTC

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