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 15:24:29 -0800
Message-ID: <AANLkTimstW1kovbFJQuRiTFrPtteeTw=-Thj1ueydE9P@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 3:18 PM, Keean Schupke <keean@fry-it.com> wrote:
> Let me put it another way. Why do you want to allow putting 'undefined' into
> the object store? All that does is make the API for get ambiguous. What does
> it gain you? Why do you want to make 'get' ambiguous?

It seems like a loose-loose situation to prevent it. Implementors will
have to add code to check for 'undefined' all the time, and users of
the API can't store 'undefined' if they would like to.

> I think having an unambiguous API for 'get' is worth more than being able to
> 'put' 'undefined' values into the object store.

Can you describe the application that would be easier to write,
possible to write, faster to run or have cleaner code if we forbade
putting 'undefined' in an object store?

/ Jonas
Received on Monday, 8 November 2010 23:25:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:41 GMT