public override void ExplicitVisit(AlterViewStatement view)
 {
     if (IsSupportedForCurrentType(view.GetType()))
     {
         Name = view.SchemaObjectName;
     }
 }
        //TODO: Create Or Replace statement
        //TODO: Check If Exist
        //TODO: Add [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
        //TODO: Add [DEFINER = { user | CURRENT_USER }]
        //TODO: add[SQL SECURITY { DEFINER | INVOKER }]
        //TODO: Add [WITH[CASCADED | LOCAL] CHECK OPTION]
        protected override void VisitAlterViewStatement(AlterViewStatement statement)
        {
            State.Write(Symbols.ALTER);

            State.Write(Symbols.VIEW);

            VisitNameToken(statement.Name);
            State.Write(Symbols.AS);
            VisitStatement(statement.DefinitionStatement);
        }
Beispiel #3
0
        public override void ExplicitVisit(CreateViewStatement node)
        {
            var target = new AlterViewStatement();

            target.SchemaObjectName = node.SchemaObjectName;
            target.Columns.AddRange(node.Columns);
            target.ViewOptions.AddRange(node.ViewOptions);
            target.SelectStatement = node.SelectStatement;
            // base.ExplicitVisit(node);
            this._ReplaceSource = node;
            this._ReplaceTarget = target;
        }
Beispiel #4
0
        protected override void VisitAlterViewStatement(AlterViewStatement statement)
        {
            State.Write(Symbols.DROP);
            State.Write(Symbols.VIEW);
            State.Write(Symbols.IF);
            State.Write(Symbols.EXISTS);
            VisitNameToken(statement.Name);
            State.WriteStatementTerminator();

            State.Write(Symbols.CREATE);
            if (statement.IsTemporary)
            {
                State.Write(Symbols.TEMPORARY);
            }
            State.Write(Symbols.VIEW);

            VisitNameToken(statement.Name);
            State.Write(Symbols.AS);
            VisitStatement(statement.DefinitionStatement);
        }
Beispiel #5
0
 protected override void VisitAlterViewStatement(AlterViewStatement statement)
 {
     this.AlterView(statement.Name, statement.DefinitionStatement);
 }
Beispiel #6
0
 public override void Visit(AlterViewStatement node) { this.action(node); }
 public override void ExplicitVisit(AlterViewStatement fragment)
 {
     _fragments.Add(fragment);
 }
Beispiel #8
0
 protected abstract void VisitAlterViewStatement(AlterViewStatement statement);
 public override void ExplicitVisit(AlterViewStatement view)
 {
     if (IsSupportedForCurrentType(view.GetType()))
     {
         Name = view.SchemaObjectName;
     }
 }
Beispiel #10
0
 public virtual bool Action(AlterViewStatement stmt)
 {
     FixIdentifiers(stmt.Name, ObjectType.VIEW, stmt.Name.Identifiers);
     return(false);
 }