Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete all conflicts in pouchDB

my problem is to sync between pouch and couchDB. I will manage to get my documents from couchDb and check in the pouch if there is already an existing document. So, if we have a conflict I want so solve the conflict on the client-side. But I don't know how to check if there is a conflict or not. Is there any way to check the pouchDb for given conflicts (after inserting or during inserting documents) and solve them.

greetings

like image 291
Syerad Avatar asked Dec 19 '25 12:12

Syerad


1 Answers

You can use the pouch-resolve-conflicts plugin, which offers a simple API for resolving conflicts. :)

And yes, you need to do it individually for all docs. So you can do an allDocs() beforehand in order to fetch them.

like image 76
nlawson Avatar answered Dec 21 '25 04:12

nlawson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!