public static SqlStatement Drop(PlSqlParser.DropViewStatementContext context) { var names = context.objectName().Select(Name.Object).ToArray(); var ifExists = context.IF() != null && context.EXISTS() != null; if (names.Length == 1) { return(new DropViewStatement(names[0], ifExists)); } var sequence = new SequenceOfStatements(); foreach (var name in names) { sequence.Statements.Add(new DropViewStatement(name, ifExists)); } return(sequence); }
public override SqlStatement VisitDropViewStatement(PlSqlParser.DropViewStatementContext context) { return(ViewStatements.Drop(context)); }