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 22:39:02 +0000
Message-ID: <AANLkTi=HKrOpA1UqqJNMd7xto3Z6LOpDUrutL0ar1Uc8@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Webapps WG <public-webapps@w3.org>
The problem I am trying to solve is not knowing if "get(key) === undefined"
means the key does not exist or there is a key with a value of undefined.

The solution is to disallow inserting undefined. Now there is no ambiguity,
if get(key) returns undefined, it _must_ be because the key does not exist.

Does this make sense so far?


On 8 November 2010 22:08, Jonas Sicking <jonas@sicking.cc> wrote:

> On Mon, Nov 8, 2010 at 1:41 PM, Keean Schupke <keean@fry-it.com> wrote:
> > What is the use case for storing undefined in an object-store?
> I don't know. But if that's not the problem you were trying to solve,
> then what problem were you trying to solve?
> / Jonas
Received on Monday, 8 November 2010 22:39:35 UTC

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