Reputation: 647
I'm trying to delete all the saved documents in CouchDB with Ektorp. A document can I delete so:
public void deleteDoc(Object o) {
db.delete(o);
}
But for all Docs? can any help?
Thanks.
Upvotes: 0
Views: 849
Reputation: 5804
If you want to delete all docs, why don't you just drop the database?
Or you can use the bulk operations in Ektorp:
List<Object> bulkDocs = ...
Sofa toBeDeleted = ...
bulkDocs.add(BulkDeleteDocument.of(toBeDeleted));
db.executeBulk(bulkDocs);
read more here: http://ektorp.org/reference_documentation.html#d100e642
Upvotes: 2