Skip to content

Deleting Multiple Objects

This API deletes multiple objects in a data table with a single request. Consider the following example, it demonstrates an API call which deletes all objects in the Person data table where the value of the age property is greater than 20:

Backendless.data.of("Person").remove(whereClause: "age > 20").then((objectsDeleted) {
  print("Server has deleted $objectsDeleted objects");
});

Method

Future<int> Backendless.data.of("TABLE-NAME").remove({Map entity, String whereClause});
Future<int> Backendless.data.withClass<E>().remove({E entity, String whereClause});

where:

Argument                Description
TABLE-NAME Name of the table where the objects expressed via Map instances will be updated.
E Dart class of the data objects to update in the database.
whereClause A condition for selecting objects to be deleted in the data table.

The method returns the number of objects deleted in the databfase.