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

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
all.

/ Jonas

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