Pouchdb: How to delete all databases?

Asked

Viewed 37 times

1

From what I saw in the Pouchdb documentation it is possible to apply db.destroy(), however, only in the database created/chosen.

It is possible to delete all databases (directly by Pouchdb)?

1 answer

1

  • 1

    Or even without the plug-in it is possible to make a Rest call to /_all_dbs, iterate on result and call db.destroy() in each of them (probably that’s what this plug-in is doing).

  • Interesting, Anthony. I’ll test your suggestion. Thank you.

  • It seems to me that this _all_dbs function has been depreciated in Pouchdb 2.0. Or I’m wrong?

  • 1

    The Rest resource continues there. What has been removed is the function of the API, this is the reason for the existence of this plugin. See the note in the manual plug-in.

  • I get it. Thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.