package com.flipkart.foxtrot.sql; import com.flipkart.foxtrot.sql.extendedsql.ExtendedSqlStatementVisitor; import com.flipkart.foxtrot.sql.extendedsql.desc.Describe; import com.flipkart.foxtrot.sql.extendedsql.showtables.ShowTables; import net.sf.jsqlparser.expression.*; import net.sf.jsqlparser.expression.operators.arithmetic.*; import net.sf.jsqlparser.expression.operators.conditional.AndExpression; import net.sf.jsqlparser.expression.operators.conditional.OrExpression; import net.sf.jsqlparser.expression.operators.relational.*; import net.sf.jsqlparser.schema.Column; import net.sf.jsqlparser.schema.Table; import net.sf.jsqlparser.statement.StatementVisitor; import net.sf.jsqlparser.statement.Statements; import net.sf.jsqlparser.statement.alter.Alter; import net.sf.jsqlparser.statement.create.index.CreateIndex; import net.sf.jsqlparser.statement.create.table.CreateTable; import net.sf.jsqlparser.statement.create.view.CreateView; import net.sf.jsqlparser.statement.delete.Delete; import net.sf.jsqlparser.statement.drop.Drop; import net.sf.jsqlparser.statement.insert.Insert; import net.sf.jsqlparser.statement.replace.Replace; import net.sf.jsqlparser.statement.select.*; import net.sf.jsqlparser.statement.truncate.Truncate; import net.sf.jsqlparser.statement.update.Update; public class SqlElementVisitor implements StatementVisitor, SelectVisitor, FromItemVisitor, ItemsListVisitor, ExpressionVisitor, SelectItemVisitor, ExtendedSqlStatementVisitor { private void invalid(Object object) { throw new RuntimeException("Unsupported construct: " + object.getClass().getSimpleName()); } @Override public void visit(NullValue nullValue) { invalid(nullValue); } @Override public void visit(Function function) { invalid(function); } @Override public void visit(SignedExpression signedExpression) { invalid(signedExpression); } @Override public void visit(JdbcParameter jdbcParameter) { invalid(jdbcParameter); } @Override public void visit(JdbcNamedParameter jdbcNamedParameter) { invalid(jdbcNamedParameter); } @Override public void visit(DoubleValue doubleValue) { invalid(doubleValue); } @Override public void visit(LongValue longValue) { invalid(longValue); } @Override public void visit(DateValue dateValue) { invalid(dateValue); } @Override public void visit(TimeValue timeValue) { invalid(timeValue); } @Override public void visit(TimestampValue timestampValue) { } @Override public void visit(Parenthesis parenthesis) { } @Override public void visit(StringValue stringValue) { } @Override public void visit(Addition addition) { } @Override public void visit(Division division) { } @Override public void visit(Multiplication multiplication) { } @Override public void visit(Subtraction subtraction) { } @Override public void visit(AndExpression andExpression) { } @Override public void visit(OrExpression orExpression) { } @Override public void visit(Between between) { } @Override public void visit(EqualsTo equalsTo) { } @Override public void visit(GreaterThan greaterThan) { } @Override public void visit(GreaterThanEquals greaterThanEquals) { } @Override public void visit(InExpression inExpression) { } @Override public void visit(IsNullExpression isNullExpression) { } @Override public void visit(LikeExpression likeExpression) { } @Override public void visit(MinorThan minorThan) { } @Override public void visit(MinorThanEquals minorThanEquals) { } @Override public void visit(NotEqualsTo notEqualsTo) { } @Override public void visit(Column tableColumn) { } @Override public void visit(CaseExpression caseExpression) { } @Override public void visit(WhenClause whenClause) { } @Override public void visit(ExistsExpression existsExpression) { } @Override public void visit(AllComparisonExpression allComparisonExpression) { } @Override public void visit(AnyComparisonExpression anyComparisonExpression) { } @Override public void visit(Concat concat) { } @Override public void visit(Matches matches) { } @Override public void visit(BitwiseAnd bitwiseAnd) { } @Override public void visit(BitwiseOr bitwiseOr) { } @Override public void visit(BitwiseXor bitwiseXor) { } @Override public void visit(CastExpression cast) { } @Override public void visit(Modulo modulo) { } @Override public void visit(AnalyticExpression aexpr) { } @Override public void visit(ExtractExpression eexpr) { } @Override public void visit(IntervalExpression iexpr) { } @Override public void visit(OracleHierarchicalExpression oexpr) { } @Override public void visit(RegExpMatchOperator rexpr) { } @Override public void visit(Table tableName) { } @Override public void visit(SubSelect subSelect) { } @Override public void visit(ExpressionList expressionList) { } @Override public void visit(MultiExpressionList multiExprList) { } @Override public void visit(SubJoin subjoin) { } @Override public void visit(LateralSubSelect lateralSubSelect) { } @Override public void visit(ValuesList valuesList) { } @Override public void visit(AllColumns allColumns) { } @Override public void visit(AllTableColumns allTableColumns) { } @Override public void visit(SelectExpressionItem selectExpressionItem) { } @Override public void visit(PlainSelect plainSelect) { } @Override public void visit(SetOperationList setOpList) { } @Override public void visit(WithItem withItem) { } @Override public void visit(Select select) { } @Override public void visit(Delete delete) { } @Override public void visit(Update update) { } @Override public void visit(Insert insert) { } @Override public void visit(Replace replace) { } @Override public void visit(Drop drop) { } @Override public void visit(Truncate truncate) { } @Override public void visit(CreateIndex createIndex) { } @Override public void visit(CreateTable createTable) { } @Override public void visit(CreateView createView) { } @Override public void visit(Alter alter) { } @Override public void visit(Statements stmts) { } @Override public void visit(Describe describe) { } @Override public void visit(ShowTables showTables) { } }