executeBatch method
Execute a write query (INSERT, UPDATE, DELETE) multiple times with each parameter set. This is faster than executing separately with each parameter set.
Implementation
@override
Future<void> executeBatch(
String sql, List<List<Object?>> parameterSets) async {
return computeWithDatabase((db) async {
final statement = db.prepare(sql, checkNoTail: true);
try {
for (var parameters in parameterSets) {
statement.execute(parameters);
}
} finally {
statement.dispose();
}
});
}