delete method

  1. @override
Future<int> delete(
  1. String collection, {
  2. required DVFilter where,
})
override

Removes the records where picks, and answers how many.

Implementation

@override
Future<int> delete(String collection, {required DVFilter where}) async {
  DVSqlRecordAdapter._refuseEverything(where, 'delete');
  final List<Map<String, Object?>> records = _in(collection);
  final int before = records.length;
  records.removeWhere(where.matches);
  return before - records.length;
}