executeBatch method
Future<List<Object?> >
executeBatch(
- void operations(
- SqfliteBatch batch
- bool? exclusive,
- bool? noResult,
- bool? continueOnError,
override
Implementation
@override
Future<List<Object?>> executeBatch(
void Function(SqfliteBatch batch) operations, {
bool? exclusive,
bool? noResult,
bool? continueOnError,
}) async {
try {
if (database == null) {
throw const DatabaseBridgeException(
error: 'Database is not initialized',
);
}
final batch = database!.batch();
operations(batch);
return await batch.commit(
exclusive: exclusive,
noResult: noResult,
continueOnError: continueOnError,
);
} catch (e) {
throw DatabaseBridgeException(error: e);
}
}