forceDelete method

Future<int> forceDelete(
  1. TKey key
)

Removes the row from the table, soft deletes or not.

Implementation

Future<int> forceDelete(TKey key) async {
  _requireKey('forceDelete');
  final engine = await _engine();
  // A force delete must be able to remove a row that is already trashed.
  // Tenant and other global scopes still constrain it; only the implicit
  // alive-row predicate is omitted.
  final outcome = await engine.deleteWhere(
    operation: 'forceDelete',
    where: <MssqlCondition>[_keyCondition(key)],
    scopes: _globalScopeConditions,
  );
  return outcome.affectedRows;
}