public override void ExplicitVisit(AlterViewStatement view)
 {
     if (IsSupportedForCurrentType(view.GetType()))
     {
         Name = view.SchemaObjectName;
     }
 }
Ejemplo n.º 2
0
        //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);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
 protected override void VisitAlterViewStatement(AlterViewStatement statement)
 {
     this.AlterView(statement.Name, statement.DefinitionStatement);
 }
Ejemplo n.º 6
0
 public override void Visit(AlterViewStatement node) { this.action(node); }
 public override void ExplicitVisit(AlterViewStatement fragment)
 {
     _fragments.Add(fragment);
 }
Ejemplo n.º 8
0
 protected abstract void VisitAlterViewStatement(AlterViewStatement statement);
Ejemplo n.º 9
0
 public override void ExplicitVisit(AlterViewStatement view)
 {
     if (IsSupportedForCurrentType(view.GetType()))
     {
         Name = view.SchemaObjectName;
     }
 }
Ejemplo n.º 10
0
 public virtual bool Action(AlterViewStatement stmt)
 {
     FixIdentifiers(stmt.Name, ObjectType.VIEW, stmt.Name.Identifiers);
     return(false);
 }