Re: [w3c/IndexedDB] Add support for async update or another way to prepopulate the databade (#126)

Also curious.

One interpretation might be that when you get the upgradeneeded event you must perform the upgrade within that transaction; you can't fetch the initial data with an async request to the server since you hit the usual transaction autocommit problem.

A pattern that works in that case is to abort the upgrade (via `request.transaction.abort()`), fetch the data, and retry the upgrade.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/126#issuecomment-264744502

Received on Monday, 5 December 2016 00:33:36 UTC