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

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 UTC