0 votes
in PouchDB by
Delete an object in PouchDB

To delete an object you can call db.remove with the object.

function deleteButtonPressed(todo) {
  db.remove(todo);
}

Similiar to editing a document, both the _id and _rev properties are required. You may notice that we are passing around the full object that we previously read from the database. You can of course manually construct the object, like: {_id: todo._id, _rev: todo._rev}, but passing around the existing object is usually more convenient and less error prone.

Related questions

0 votes
asked Jun 5, 2020 in PouchDB by AdilsonLima
0 votes
asked Jun 5, 2020 in PouchDB by AdilsonLima
...