deleteWhere method
Deletes all the entries that are compliant to the where
clause.
Implementation
@override
Future<void> deleteWhere(Where where) async {
var query = _collectionReference.where(
where.field,
isEqualTo: where.isEqualTo,
isNotEqualTo: where.isNotEqualTo,
isLessThan: where.isLessThan,
isGreaterThan: where.isGreaterThan,
isLessThanOrEqualTo: where.isLessThanOrEqualTo,
isGreaterThanOrEqualTo: where.isGreaterThanOrEqualTo,
arrayContains: where.arrayContains,
arrayContainsAny: where.arrayContainsAny,
whereIn: where.whereIn,
whereNotIn: where.whereNotIn,
isNull: where.isNull,
);
return query.get().then((value) {
for (final doc in value.docs) {
doc.reference.delete();
}
});
}