Indexeddb with Node Webkit

564 views Asked by At

I am very new to IndexedDB with Node WebKit, I have a database in my project which is required to store some information, due to continuous development now we have multiple databases in IndexedDB, does anyone knows how to delete all the created database from IndexedDB in one go?

1

There are 1 answers

0
hagrawal7777 On BEST ANSWER

There is no such API to drop all object stores, either you have iterate through all object store (which I think you don't want to do) or you can delete the database itself, as shown using below code:

            var dbDeleteRequest = window.indexedDB.deleteDatabase(DB_NAME);
            dbDeleteRequest.onerror = function(event) {
                //Code
            };
            dbDeleteRequest.onsuccess = function(event) {
                //Code
            };