[IndexedDB] Add "open if exists" (#58)

open() always creates a database if it doesn't exist, but this doesn't always make sense:

* An inspection tool
* Use a cache if it was previously created/populated, but don't create/populate it now

The inspection tool case is more of an implementation detail (since it would need an out-of-band enumeration mechanism, etc).

The cache approach can be handled in a gross way by having the population code specify an artificially higher version (e.g. 2) and the "if exists" code can use the default; if the database opens at v2 it knows the population was done, if it opens at v1 then it has not been populated and should immediately close/abort.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/58

Received on Wednesday, 7 October 2015 19:45:58 UTC