public override void ExplicitVisit(AlterIndexStatement index) { if (IsSupportedForCurrentType(index.GetType())) { Name = index.Name; } }
protected override void VisitAlterIndexStatement(AlterIndexStatement statement) { if (statement.Rebuild) { State.Write(Symbols.REINDEX); if (statement.Name == null) { VisitToken(statement.On); } else { VisitToken(Sql.Name(statement.On.FirstPart, statement.Name.LastPart)); } } }
protected override void VisitAlterIndexStatement(AlterIndexStatement statement) { }
public override void Visit(AlterIndexStatement node) { this.action(node); }
//There is no ALTER INDEX command in MySQL protected override void VisitAlterIndexStatement(AlterIndexStatement statement) { VisitStatement(Sql.DropIndex(statement.Name, statement.On, false)); State.WriteStatementTerminator(); CreateIndex(statement); }
public override void ExplicitVisit(AlterIndexStatement fragment) { _fragments.Add(fragment); }
protected abstract void VisitAlterIndexStatement(AlterIndexStatement statement);
/// <summary> /// Add all options to the list of index options, overriding existing values if present /// </summary> public override void ExplicitVisit(AlterIndexStatement node) { IndexExplicitVisit(node); }
public override void ExplicitVisit(AlterIndexStatement node) { Alters.Add(node); _called = true; base.ExplicitVisit(node); }
public virtual bool Action(AlterIndexStatement node) { AddTablesContext(node); FixIdentifier(new DbObject(node.Index), ObjectType.INDEX, node.Index); return(false); }
private IList <DbObjectTableSource> GetAvailTables(GrammarNode node) { IList <DbObjectTableSource> ret = new List <DbObjectTableSource>(); if (node is UpdateStatement) { UpdateStatement upd = (UpdateStatement)node; dynamic ts = upd.TableSource; AddAvailTable(ts, ret); AddAvailTables(upd.FromClause, ret); } if (node is DeleteStatement) { dynamic ts = ((DeleteStatement)node).Table; AddAvailTable(ts, ret); } if (node is InsertStatement) { InsertStatement insert = (InsertStatement)node; if (insert.InsertTarget is DbObjectInsertTarget) { AddAvailTable(((DbObjectInsertTarget)insert.InsertTarget).TableSource, ret); } } if (node is CreateIndexStatement) { CreateIndexStatement stmt = (CreateIndexStatement)node; if (stmt.IndexTarget is DbObjectIndexTarget) { AddAvailTable(stmt.IndexTarget.TableSource, ret); } } if (node is DropIndexStatement) { DropIndexStatement stmt = (DropIndexStatement)node; foreach (DropIndexAction action in stmt.Actions) { if (action.TableSource != null) { AddAvailTable(action.TableSource, ret); } } } if (node is AlterIndexStatement) { AlterIndexStatement stmt = (AlterIndexStatement)node; if (stmt.TableSource != null) { // It will be removed in Modifier, so probably useless code AddAvailTable(stmt.TableSource, ret); } } if (node is AlterTableStatement) { AlterTableStatement stmt = (AlterTableStatement)node; if (stmt.TableSource != null) { AddAvailTable(stmt.TableSource, ret); } } if (node is DropTableStatement) { DropTableStatement stmt = (DropTableStatement)node; foreach (DbObjectTableSource tableSource in stmt.TableSources) { if (tableSource != null) { AddAvailTable(tableSource, ret); } } } TrimTables(ref ret); return((ret.Count == 0) ? null : ret); }