yathit / ydn-db

Javascript database module for Indexeddb, Web SQL and localStorage storage mechanisms supporting version migration, advanced query, SQL and transaction.
Apache License 2.0
503 stars 41 forks source link

Example of deleting DB and recreating when page is loaded/reloaded but not when refreshed #105

Closed MB34 closed 8 years ago

MB34 commented 8 years ago

Attached is the animals demo that will delete the database if the page is being loaded or reloaded but not refreshed.

This allows you to have fresh data each time the user comes to the page.

I have also shown how to modify the renderResult() function to be used when you call this.db.search() and when you call this.db.values() and added a getAll() function to print all records.

mb34_animals.zip

yathit commented 8 years ago

👍