W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

[IndexedDB] deleteObjectStore method and updates to IDBDatabase.objectStoreNames on the client

From: Israel Hilerio <israelh@microsoft.com>
Date: Wed, 4 May 2011 01:43:11 +0000
To: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <F695AF7AA77CC745A271AD0F61BBC61E3D04157E@TK5EX14MBXC113.redmond.corp.microsoft.com>
In looking at createObjectStore on IDBDatabase, it seems that we would have to update the IDBDatabase.objectStoreNames attribute on the client side after returning the IDBObjectStore.  Otherwise, it would be difficult to detect that an objectStore with the same name already exists and throw a CONSTRAINT_ERR exception.

Following this pattern, would it make sense to update the IDBDatabase.objectStoreNames attribute on the client side after executing deleteObjectStore before the async operation is executed.  This would allow us to support scenarios like:

var b = db.createObjectStore(B);
var req = db.deleteObjectStore(B);
b = db.createObjectStore(B);

What do you think?

Israel
Received on Wednesday, 4 May 2011 01:43:41 GMT

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