I've a "best practice" question on CouchDB (actually I'm using TouchDB a CouchDB port to iOS), when using CouchCocoa framework.
I need to delete a bunch of documents that I get via a query. I know 3 ways to do this:
1) put all the documents into an NSArray, then use [CouchDatabase deleteDocuments:]
2) foreach query rows call the delete method, like: for (CouchQueryRow* row in query.rows) [row.document DELETE];
3) create a query that emit the _id, _rev properties and add the _deleted property, then use the bulk update, like: [couchDatabase putChanges:]
What's the better performance-wise? There's a better way to do it?