executeScript method
Execute a SQL script (multiple statements)
Implementation
@override
Future<void> executeScript(String script) async {
try {
// Split script into statements
final statements = script.split(';').where((s) => s.trim().isNotEmpty);
await _database.transaction((txn) async {
for (final statement in statements) {
await txn.execute(statement.trim());
}
});
} catch (e) {
throw AdapterError(
'Failed to execute script: ${e.toString()}',
originalError: e,
);
}
}