Deveel.Data.Sql.Statements.DropTypeStatement.ExecuteStatement C# (CSharp) Method

ExecuteStatement() protected method

protected ExecuteStatement ( ExecutionContext context ) : void
context ExecutionContext
return void
        protected override void ExecuteStatement(ExecutionContext context)
        {
            if (!context.DirectAccess.TypeExists(TypeName)) {
                if (!IfExists)
                    throw new ObjectNotFoundException(TypeName);

                return;
            }

            //if (!context.User.CanDrop(DbObjectType.Type, TypeName))
            //	throw new MissingPrivilegesException(context.User.Name, TypeName, Privileges.Drop);

            var children = context.DirectAccess.GetChildTypes(TypeName);
            foreach (var child in children) {
                DropType(context, child);
            }

            DropType(context, TypeName);
        }