execute method

Future<int> execute(
  1. String sql, {
  2. Object parameters = const <String, Object?>{},
  3. MssqlQueryOptions options = MssqlQueryOptions.defaults,
  4. Duration? timeout,
  5. MssqlCancellationToken? cancellationToken,
})
inherited

Runs sql for its effect and returns the affected row count.

Implementation

Future<int> execute(
  String sql, {
  Object parameters = const <String, Object?>{},
  MssqlQueryOptions options = MssqlQueryOptions.defaults,
  Duration? timeout,
  MssqlCancellationToken? cancellationToken,
}) async {
  final result = await query(
    sql,
    parameters: parameters,
    options: options.withoutRetry,
    timeout: timeout,
    cancellationToken: cancellationToken,
  );
  return result.affectedRows;
}