protected ExecuteStatement ( ExecutionContext context ) : void | ||
context | ExecutionContext | |
Результат | void |
protected override void ExecuteStatement(ExecutionContext context)
{
if (!context.DirectAccess.TriggerExists(TriggerName))
throw new ObjectNotFoundException(TriggerName);
//if (!context.User.CanDrop(DbObjectType.Trigger, TriggerName))
// throw new SecurityException(String.Format("User '{0}' has not enough rights to drop trigger '{1}'.", context.User.Name, TriggerName));
context.DirectAccess.DropTrigger(TriggerName);
context.DirectAccess.RevokeAllGrantsOn(DbObjectType.Trigger, TriggerName);
}