deleteMany method
Future<List<String> >
deleteMany(
- List<
String> ids, { - required String userId,
- DataSource source = DataSource.local,
- bool forceRemoteSync = false,
- DeleteBehavior? behavior,
Deletes multiple entities by ids in one call, returning the ids that
were actually removed (a batch convenience over delete).
Implementation
Future<List<String>> deleteMany(
List<String> ids, {
required String userId,
DataSource source = DataSource.local,
bool forceRemoteSync = false,
DeleteBehavior? behavior,
}) async {
_ensureInitialized();
final deleted = <String>[];
for (final id in ids) {
final ok = await delete(
id: id,
userId: userId,
source: source,
forceRemoteSync: forceRemoteSync,
behavior: behavior,
);
if (ok) deleted.add(id);
}
return deleted;
}