- From: Jeremy Orlow <jorlow@chromium.org>
- Date: Wed, 4 May 2011 09:47:12 +0530
- To: Israel Hilerio <israelh@microsoft.com>
- Cc: "public-webapps@w3.org" <public-webapps@w3.org>
Received on Wednesday, 4 May 2011 04:17:59 UTC
Well, createObjectStore is synchronous, so that one's easy. Everything happens at once in terms of side effects. As for delete: why is this asynchronous again? It seems easiest just to make it sync unless there's some major problem with doing so. Either way, it seems that the change to objectStoreNames should either happen immediately or when firing the onsuccess event (i.e. not just at some random time in between). J On Wed, May 4, 2011 at 7:13 AM, Israel Hilerio <israelh@microsoft.com>wrote: > 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 04:17:59 UTC