Simple question, but I haven't been able to find an answer.
How can I reset an object store in IndexedDB so the auto-increment key starts at 0 (or 1) again?
I am using IDBWrapper currently, but could use an alternative library if it is easier. I am using in-line keys.
From here: http://jensarps.de/2011/11/25/working-with-idbwrapper-part-1
If you need to clear the store from all stored entries, you can use the clear method. Note that this won’t reset Chrome’s autoIncrement counter.
If I manually clear the object store in Chrome Developer tools, this does not reset the key to 0 (or 1).
I did find this rejected bug: https://bugzilla.mozilla.org/show_bug.cgi?id=635551 and from there, this outline of key generation: http://www.w3.org/TR/2012/WD-IndexedDB-20120524/#key-generator-concept
Presumably I could write my own logic to remember when the store was last cleared and then alter the code where records are inserted to manually override the key to be 0 (or 1), but is this really necessary?