execute method
Execute INSERT, UPDATE, DELETE commands
Implementation
Future<int> execute(String sql, [List<dynamic>? parameters]) async {
_ensureConnected();
try {
final result = await _channel.invokeMethod('execute', {
'connectionId': _connectionId,
'sql': sql,
'parameters': parameters ?? [],
});
return result as int? ?? 0;
} on PlatformException catch (e) {
throw QueryException(
'Execute command failed',
details: e.details as String?,
);
}
}