package com.chenyang.druid.sql.dialect.oracle.visitor;

import com.chenyang.druid.DbType;
import com.chenyang.druid.sql.SQLUtils;
import com.chenyang.druid.sql.ast.SQLExpr;
import com.chenyang.druid.sql.ast.SQLName;
import com.chenyang.druid.sql.ast.SQLObject;
import com.chenyang.druid.sql.ast.SQLStatement;
import com.chenyang.druid.sql.ast.expr.SQLBinaryOpExpr;
import com.chenyang.druid.sql.ast.expr.SQLBinaryOperator;
import com.chenyang.druid.sql.ast.expr.SQLCharExpr;
import com.chenyang.druid.sql.ast.expr.SQLIdentifierExpr;
import com.chenyang.druid.sql.ast.expr.SQLPropertyExpr;
import com.chenyang.druid.sql.ast.statement.SQLAlterTableStatement;
import com.chenyang.druid.sql.ast.statement.SQLAssignItem;
import com.chenyang.druid.sql.ast.statement.SQLBlockStatement;
import com.chenyang.druid.sql.ast.statement.SQLCheck;
import com.chenyang.druid.sql.ast.statement.SQLColumnDefinition;
import com.chenyang.druid.sql.ast.statement.SQLCreateIndexStatement;
import com.chenyang.druid.sql.ast.statement.SQLCreateTableStatement;
import com.chenyang.druid.sql.ast.statement.SQLDeleteStatement;
import com.chenyang.druid.sql.ast.statement.SQLExprTableSource;
import com.chenyang.druid.sql.ast.statement.SQLForeignKeyImpl;
import com.chenyang.druid.sql.ast.statement.SQLInsertStatement;
import com.chenyang.druid.sql.ast.statement.SQLJoinTableSource;
import com.chenyang.druid.sql.ast.statement.SQLSelect;
import com.chenyang.druid.sql.ast.statement.SQLSelectQueryBlock;
import com.chenyang.druid.sql.ast.statement.SQLSetStatement;
import com.chenyang.druid.sql.ast.statement.SQLTableSource;
import com.chenyang.druid.sql.ast.statement.SQLUnique;
import com.chenyang.druid.sql.dialect.oracle.ast.OracleDataTypeIntervalDay;
import com.chenyang.druid.sql.dialect.oracle.ast.OracleDataTypeIntervalYear;
import com.chenyang.druid.sql.dialect.oracle.ast.clause.CycleClause;
import com.chenyang.druid.sql.dialect.oracle.ast.clause.ModelClause;
import com.chenyang.druid.sql.dialect.oracle.ast.clause.OracleLobStorageClause;
import com.chenyang.druid.sql.dialect.oracle.ast.clause.OracleReturningClause;
import com.chenyang.druid.sql.dialect.oracle.ast.clause.OracleStorageClause;
import com.chenyang.druid.sql.dialect.oracle.ast.clause.OracleWithSubqueryEntry;
import com.chenyang.druid.sql.dialect.oracle.ast.clause.PartitionExtensionClause;
import com.chenyang.druid.sql.dialect.oracle.ast.clause.SampleClause;
import com.chenyang.druid.sql.dialect.oracle.ast.clause.SearchClause;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleAnalytic;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleAnalyticWindowing;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleArgumentExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleBinaryDoubleExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleBinaryFloatExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleCursorExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleDatetimeExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleIntervalExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleIsOfTypeExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleIsSetExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleJsonArrayAggExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleJsonObjectExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleMethodInvokeAccessExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleMultisetExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleOuterExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleRangeExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleSysdateExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleTreatExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.expr.OracleXmlContentExpr;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterSessionStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterSynonymStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterTableDropPartition;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterTableModify;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterTableMoveTablespace;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterTableSplitPartition;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterTableTruncatePartition;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterTablespaceAddDataFile;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterTablespaceStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterTriggerStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleAlterViewStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleCheck;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleContinueStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleCreateDatabaseDbLinkStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleCreateIndexStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleCreatePackageStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleCreateSynonymStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleCreateTableStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleCreateTypeStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleDeleteStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleDropDbLinkStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleExceptionStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleExecuteImmediateStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleExitStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleExplainStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleFileSpecification;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleForStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleForeignKey;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleGotoStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleInsertStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleLabelStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleLockTableStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleMultiInsertStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OraclePipeRowStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OraclePrimaryKey;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleRaiseStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleRunStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleSelectJoin;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleSelectPivot;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleSelectQueryBlock;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleSelectRestriction;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleSelectSubqueryTableSource;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleSelectTableReference;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleSelectUnPivot;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleSetTransactionStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleSupplementalIdKey;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleSupplementalLogGrp;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleUnique;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleUpdateStatement;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleUsingIndexClause;
import com.chenyang.druid.sql.dialect.oracle.ast.stmt.OracleXmlColumnProperties;
import com.chenyang.druid.sql.repository.SchemaRepository;
import com.chenyang.druid.sql.visitor.SchemaStatVisitor;
import com.chenyang.druid.stat.TableStat;
import com.chenyang.druid.util.FnvHash;
import java.util.ArrayList;
import java.util.List;

public class OracleSchemaStatVisitor extends SchemaStatVisitor implements OracleASTVisitor {
   public OracleSchemaStatVisitor() {
      this((List)(new ArrayList()));
   }

   public OracleSchemaStatVisitor(SchemaRepository repository) {
      super(repository);
   }

   public OracleSchemaStatVisitor(List<Object> parameters) {
      super(DbType.oracle, parameters);
   }

   protected TableStat.Column getColumn(SQLExpr expr) {
      if (expr instanceof OracleOuterExpr) {
         expr = ((OracleOuterExpr)expr).getExpr();
      }

      return super.getColumn(expr);
   }

   public boolean visit(OracleSelectTableReference x) {
      SQLExpr expr = x.getExpr();
      TableStat stat = this.getTableStat(x);
      if (expr instanceof SQLName) {
         if (((SQLName)expr).nameHashCode64() == FnvHash.Constants.DUAL) {
            return false;
         } else {
            if (expr instanceof SQLPropertyExpr) {
               SQLPropertyExpr propertyExpr = (SQLPropertyExpr)expr;
               if (this.isSubQueryOrParamOrVariant(propertyExpr)) {
                  return false;
               }
            } else if (expr instanceof SQLIdentifierExpr) {
               SQLIdentifierExpr identifierExpr = (SQLIdentifierExpr)expr;
               if (this.isSubQueryOrParamOrVariant(identifierExpr)) {
                  return false;
               }
            }

            TableStat.Mode mode = this.getMode();
            switch (mode) {
               case Delete:
                  stat.incrementDeleteCount();
                  break;
               case Insert:
                  stat.incrementInsertCount();
                  break;
               case Update:
                  stat.incrementUpdateCount();
                  break;
               case Select:
                  stat.incrementSelectCount();
                  break;
               case Merge:
                  stat.incrementMergeCount();
            }

            return false;
         }
      } else {
         return false;
      }
   }

   public boolean visit(OracleUpdateStatement x) {
      if (this.repository != null && x.getParent() == null) {
         this.repository.resolve((SQLStatement)x);
      }

      this.setMode(x, TableStat.Mode.Update);
      SQLTableSource tableSource = x.getTableSource();
      SQLExpr tableExpr = null;
      if (tableSource instanceof SQLExprTableSource) {
         tableExpr = ((SQLExprTableSource)tableSource).getExpr();
      }

      if (tableExpr instanceof SQLName) {
         TableStat stat = this.getTableStat((SQLName)tableExpr);
         stat.incrementUpdateCount();
      } else {
         tableSource.accept(this);
      }

      this.accept(x.getItems());
      this.accept(x.getWhere());
      return false;
   }

   public boolean visit(OracleSelectQueryBlock x) {
      SQLExprTableSource into = x.getInto();
      return this.visit((SQLSelectQueryBlock)x);
   }

   public void endVisit(OracleSelectQueryBlock x) {
      this.endVisit((SQLSelectQueryBlock)x);
   }

   public boolean visit(SQLPropertyExpr x) {
      return "ROWNUM".equalsIgnoreCase(x.getName()) ? false : super.visit(x);
   }

   public boolean visit(SQLIdentifierExpr x) {
      String name = x.getName();
      if ("+".equalsIgnoreCase(name)) {
         return false;
      } else {
         long hashCode64 = x.hashCode64();
         if (hashCode64 != FnvHash.Constants.ROWNUM && hashCode64 != FnvHash.Constants.SYSDATE && hashCode64 != FnvHash.Constants.LEVEL && hashCode64 != FnvHash.Constants.SQLCODE) {
            return hashCode64 == FnvHash.Constants.ISOPEN && x.getParent() instanceof SQLBinaryOpExpr && ((SQLBinaryOpExpr)x.getParent()).getOperator() == SQLBinaryOperator.Modulus ? false : super.visit(x);
         } else {
            return false;
         }
      }
   }

   public boolean visit(OracleSelectJoin x) {
      super.visit((SQLJoinTableSource)x);
      return false;
   }

   public boolean visit(OracleSelectSubqueryTableSource x) {
      this.accept(x.getSelect());
      this.accept(x.getPivot());
      this.accept(x.getFlashback());
      return false;
   }

   public boolean visit(OracleWithSubqueryEntry x) {
      x.getSubQuery().accept(this);
      return false;
   }

   public boolean visit(OracleMultiInsertStatement.InsertIntoClause x) {
      if (x.getTableName() instanceof SQLName) {
         TableStat stat = this.getTableStat(x.getTableName());
         stat.incrementInsertCount();
      }

      this.accept(x.getColumns());
      this.accept(x.getQuery());
      this.accept(x.getReturning());
      this.accept(x.getErrorLogging());
      return false;
   }

   public boolean visit(OracleMultiInsertStatement x) {
      if (this.repository != null && x.getParent() == null) {
         this.repository.resolve((SQLStatement)x);
      }

      x.putAttribute("_original_use_mode", this.getMode());
      this.setMode(x, TableStat.Mode.Insert);
      this.accept(x.getSubQuery());
      this.accept(x.getEntries());
      return false;
   }

   public boolean visit(OracleMultiInsertStatement.ConditionalInsertClauseItem x) {
      SQLObject parent = x.getParent();
      if (parent instanceof OracleMultiInsertStatement.ConditionalInsertClause) {
         parent = parent.getParent();
      }

      if (parent instanceof OracleMultiInsertStatement) {
         SQLSelect var3 = ((OracleMultiInsertStatement)parent).getSubQuery();
      }

      x.getWhen().accept(this);
      x.getThen().accept(this);
      return false;
   }

   public boolean visit(OracleAlterSessionStatement x) {
      return false;
   }

   public boolean visit(OracleLockTableStatement x) {
      this.getTableStat(x.getTable());
      return false;
   }

   public boolean visit(OracleSysdateExpr x) {
      return false;
   }

   public boolean visit(OracleExceptionStatement.Item x) {
      SQLExpr when = x.getWhen();
      if (when instanceof SQLIdentifierExpr) {
         SQLIdentifierExpr ident = (SQLIdentifierExpr)when;
         if (!ident.getName().equalsIgnoreCase("OTHERS")) {
            this.visit(ident);
         }
      } else if (when != null) {
         when.accept(this);
      }

      for(SQLStatement stmt : x.getStatements()) {
         stmt.accept(this);
      }

      return false;
   }

   public boolean visit(OracleSetTransactionStatement x) {
      return false;
   }

   public boolean visit(OracleExplainStatement x) {
      return false;
   }

   public boolean visit(OracleAlterTableDropPartition x) {
      return false;
   }

   public boolean visit(OracleAlterTableTruncatePartition x) {
      return false;
   }

   public boolean visit(OracleAlterTableSplitPartition.TableSpaceItem x) {
      return false;
   }

   public boolean visit(OracleAlterTableSplitPartition.UpdateIndexesClause x) {
      return false;
   }

   public boolean visit(OracleAlterTableSplitPartition.NestedTablePartitionSpec x) {
      return false;
   }

   public boolean visit(OracleAlterTableSplitPartition x) {
      return false;
   }

   public boolean visit(OracleAlterTableModify x) {
      SQLAlterTableStatement stmt = (SQLAlterTableStatement)x.getParent();
      SQLName tableName = stmt.getName();

      for(SQLColumnDefinition column : x.getColumns()) {
         SQLName columnName = column.getName();
         this.addColumn(tableName, columnName.toString());
      }

      return false;
   }

   public boolean visit(OracleForStatement x) {
      x.getRange().accept(this);
      this.accept(x.getStatements());
      return false;
   }

   public boolean visit(OraclePrimaryKey x) {
      this.accept(x.getColumns());
      return false;
   }

   public boolean visit(OracleCreateTableStatement x) {
      this.visit((SQLCreateTableStatement)x);
      if (x.getSelect() != null) {
         x.getSelect().accept(this);
      }

      return false;
   }

   public boolean visit(OracleStorageClause x) {
      return false;
   }

   public boolean visit(OracleGotoStatement x) {
      return false;
   }

   public boolean visit(OracleLabelStatement x) {
      return false;
   }

   public boolean visit(OracleAlterTriggerStatement x) {
      return false;
   }

   public boolean visit(OracleAlterSynonymStatement x) {
      return false;
   }

   public boolean visit(OracleAlterViewStatement x) {
      return false;
   }

   public boolean visit(OracleAlterTableMoveTablespace x) {
      return false;
   }

   public boolean visit(OracleFileSpecification x) {
      return false;
   }

   public boolean visit(OracleAlterTablespaceAddDataFile x) {
      return false;
   }

   public boolean visit(OracleAlterTablespaceStatement x) {
      return false;
   }

   public boolean visit(OracleExitStatement x) {
      return false;
   }

   public boolean visit(OracleContinueStatement x) {
      return false;
   }

   public boolean visit(OracleRaiseStatement x) {
      return false;
   }

   public boolean visit(OracleCreateDatabaseDbLinkStatement x) {
      return false;
   }

   public boolean visit(OracleDropDbLinkStatement x) {
      return false;
   }

   public boolean visit(OracleDataTypeIntervalYear x) {
      return false;
   }

   public boolean visit(OracleDataTypeIntervalDay x) {
      return false;
   }

   public boolean visit(OracleUsingIndexClause x) {
      return false;
   }

   public boolean visit(OracleLobStorageClause x) {
      return false;
   }

   public boolean visit(OracleCreateTableStatement.Organization x) {
      return false;
   }

   public boolean visit(OracleCreateTableStatement.OIDIndex x) {
      return false;
   }

   public boolean visit(OracleCreatePackageStatement x) {
      if (this.repository != null && x.getParent() == null) {
         this.repository.resolve((SQLStatement)x);
      }

      for(SQLStatement stmt : x.getStatements()) {
         stmt.accept(this);
      }

      return false;
   }

   public boolean visit(OracleExecuteImmediateStatement x) {
      SQLExpr dynamicSql = x.getDynamicSql();
      String sql = null;
      if (dynamicSql instanceof SQLIdentifierExpr) {
         String varName = ((SQLIdentifierExpr)dynamicSql).getName();
         SQLExpr valueExpr = null;
         if (x.getParent() instanceof SQLBlockStatement) {
            List<SQLStatement> statementList = ((SQLBlockStatement)x.getParent()).getStatementList();
            int i = 0;

            for(int size = statementList.size(); i < size; ++i) {
               SQLStatement stmt = (SQLStatement)statementList.get(i);
               if (stmt == x) {
                  break;
               }

               if (stmt instanceof SQLSetStatement) {
                  for(SQLAssignItem item : ((SQLSetStatement)stmt).getItems()) {
                     if (item.getTarget().equals(dynamicSql)) {
                        valueExpr = item.getValue();
                        break;
                     }
                  }
               }
            }
         }

         if (valueExpr != null) {
            dynamicSql = valueExpr;
         }
      }

      if (dynamicSql instanceof SQLCharExpr) {
         sql = ((SQLCharExpr)dynamicSql).getText();
      }

      if (sql != null) {
         for(SQLStatement stmt : SQLUtils.parseStatements(sql, this.dbType)) {
            stmt.accept(this);
         }
      }

      return false;
   }

   public boolean visit(OracleCreateSynonymStatement x) {
      return false;
   }

   public boolean visit(OracleCreateTypeStatement x) {
      return false;
   }

   public boolean visit(OraclePipeRowStatement x) {
      return false;
   }

   public boolean visit(OracleIsOfTypeExpr x) {
      return false;
   }

   public boolean visit(OracleXmlColumnProperties x) {
      return false;
   }

   public boolean visit(OracleXmlColumnProperties.OracleXMLTypeStorage x) {
      return false;
   }

   public void endVisit(OracleAnalytic x) {
   }

   public void endVisit(OracleAnalyticWindowing x) {
   }

   public void endVisit(OracleDeleteStatement x) {
      this.endVisit((SQLDeleteStatement)x);
   }

   public void endVisit(OracleIntervalExpr x) {
   }

   public void endVisit(OracleOuterExpr x) {
   }

   public void endVisit(OracleSelectJoin x) {
   }

   public void endVisit(OracleSelectPivot x) {
   }

   public void endVisit(OracleSelectPivot.Item x) {
   }

   public void endVisit(OracleSelectRestriction.CheckOption x) {
   }

   public void endVisit(OracleSelectRestriction.ReadOnly x) {
   }

   public void endVisit(OracleSelectSubqueryTableSource x) {
   }

   public void endVisit(OracleSelectUnPivot x) {
   }

   public void endVisit(OracleUpdateStatement x) {
   }

   public boolean visit(OracleAnalytic x) {
      return true;
   }

   public boolean visit(OracleAnalyticWindowing x) {
      return true;
   }

   public boolean visit(OracleDeleteStatement x) {
      return this.visit((SQLDeleteStatement)x);
   }

   public boolean visit(OracleIntervalExpr x) {
      return true;
   }

   public boolean visit(OracleOuterExpr x) {
      return true;
   }

   public boolean visit(OracleSelectPivot x) {
      return true;
   }

   public boolean visit(OracleSelectPivot.Item x) {
      return true;
   }

   public boolean visit(OracleSelectRestriction.CheckOption x) {
      return true;
   }

   public boolean visit(OracleSelectRestriction.ReadOnly x) {
      return true;
   }

   public boolean visit(OracleSelectUnPivot x) {
      return true;
   }

   public boolean visit(SampleClause x) {
      return true;
   }

   public void endVisit(SampleClause x) {
   }

   public void endVisit(OracleSelectTableReference x) {
   }

   public boolean visit(PartitionExtensionClause x) {
      return true;
   }

   public void endVisit(PartitionExtensionClause x) {
   }

   public void endVisit(OracleWithSubqueryEntry x) {
   }

   public boolean visit(SearchClause x) {
      return true;
   }

   public void endVisit(SearchClause x) {
   }

   public boolean visit(CycleClause x) {
      return true;
   }

   public void endVisit(CycleClause x) {
   }

   public boolean visit(OracleBinaryFloatExpr x) {
      return true;
   }

   public void endVisit(OracleBinaryFloatExpr x) {
   }

   public boolean visit(OracleBinaryDoubleExpr x) {
      return true;
   }

   public void endVisit(OracleBinaryDoubleExpr x) {
   }

   public boolean visit(OracleCursorExpr x) {
      return true;
   }

   public void endVisit(OracleCursorExpr x) {
   }

   public boolean visit(OracleIsSetExpr x) {
      return true;
   }

   public void endVisit(OracleIsSetExpr x) {
   }

   public boolean visit(ModelClause.ReturnRowsClause x) {
      return true;
   }

   public void endVisit(ModelClause.ReturnRowsClause x) {
   }

   public boolean visit(ModelClause.MainModelClause x) {
      return true;
   }

   public void endVisit(ModelClause.MainModelClause x) {
   }

   public boolean visit(ModelClause.ModelColumnClause x) {
      return true;
   }

   public void endVisit(ModelClause.ModelColumnClause x) {
   }

   public boolean visit(ModelClause.QueryPartitionClause x) {
      return true;
   }

   public void endVisit(ModelClause.QueryPartitionClause x) {
   }

   public boolean visit(ModelClause.ModelColumn x) {
      return true;
   }

   public void endVisit(ModelClause.ModelColumn x) {
   }

   public boolean visit(ModelClause.ModelRulesClause x) {
      return true;
   }

   public void endVisit(ModelClause.ModelRulesClause x) {
   }

   public boolean visit(ModelClause.CellAssignmentItem x) {
      return true;
   }

   public void endVisit(ModelClause.CellAssignmentItem x) {
   }

   public boolean visit(ModelClause.CellAssignment x) {
      return true;
   }

   public void endVisit(ModelClause.CellAssignment x) {
   }

   public boolean visit(ModelClause x) {
      return true;
   }

   public void endVisit(ModelClause x) {
   }

   public boolean visit(OracleReturningClause x) {
      return true;
   }

   public void endVisit(OracleReturningClause x) {
   }

   public boolean visit(OracleInsertStatement x) {
      return this.visit((SQLInsertStatement)x);
   }

   public void endVisit(OracleInsertStatement x) {
      this.endVisit((SQLInsertStatement)x);
   }

   public void endVisit(OracleMultiInsertStatement.InsertIntoClause x) {
   }

   public void endVisit(OracleMultiInsertStatement x) {
   }

   public boolean visit(OracleMultiInsertStatement.ConditionalInsertClause x) {
      return true;
   }

   public void endVisit(OracleMultiInsertStatement.ConditionalInsertClause x) {
   }

   public void endVisit(OracleMultiInsertStatement.ConditionalInsertClauseItem x) {
   }

   public void endVisit(OracleLockTableStatement x) {
   }

   public void endVisit(OracleAlterSessionStatement x) {
   }

   public boolean visit(OracleDatetimeExpr x) {
      return true;
   }

   public void endVisit(OracleDatetimeExpr x) {
   }

   public void endVisit(OracleSysdateExpr x) {
   }

   public boolean visit(OracleExceptionStatement x) {
      return true;
   }

   public void endVisit(OracleExceptionStatement x) {
   }

   public void endVisit(OracleExceptionStatement.Item x) {
   }

   public boolean visit(OracleArgumentExpr x) {
      return true;
   }

   public void endVisit(OracleArgumentExpr x) {
   }

   public void endVisit(OracleSetTransactionStatement x) {
   }

   public void endVisit(OracleExplainStatement x) {
   }

   public void endVisit(OracleAlterTableDropPartition x) {
   }

   public void endVisit(OracleAlterTableTruncatePartition x) {
   }

   public void endVisit(OracleAlterTableSplitPartition.TableSpaceItem x) {
   }

   public void endVisit(OracleAlterTableSplitPartition.UpdateIndexesClause x) {
   }

   public void endVisit(OracleAlterTableSplitPartition.NestedTablePartitionSpec x) {
   }

   public void endVisit(OracleAlterTableSplitPartition x) {
   }

   public void endVisit(OracleAlterTableModify x) {
   }

   public boolean visit(OracleCreateIndexStatement x) {
      return this.visit((SQLCreateIndexStatement)x);
   }

   public void endVisit(OracleCreateIndexStatement x) {
      this.endVisit((SQLCreateIndexStatement)x);
   }

   public void endVisit(OracleForStatement x) {
   }

   public boolean visit(OracleRangeExpr x) {
      return true;
   }

   public void endVisit(OracleRangeExpr x) {
   }

   public void endVisit(OraclePrimaryKey x) {
   }

   public void endVisit(OracleCreateTableStatement x) {
      this.endVisit((SQLCreateTableStatement)x);
   }

   public void endVisit(OracleStorageClause x) {
   }

   public void endVisit(OracleGotoStatement x) {
   }

   public void endVisit(OracleLabelStatement x) {
   }

   public void endVisit(OracleAlterTriggerStatement x) {
   }

   public void endVisit(OracleAlterSynonymStatement x) {
   }

   public void endVisit(OracleAlterViewStatement x) {
   }

   public void endVisit(OracleAlterTableMoveTablespace x) {
   }

   public void endVisit(OracleFileSpecification x) {
   }

   public void endVisit(OracleAlterTablespaceAddDataFile x) {
   }

   public void endVisit(OracleAlterTablespaceStatement x) {
   }

   public void endVisit(OracleExitStatement x) {
   }

   public void endVisit(OracleContinueStatement x) {
   }

   public void endVisit(OracleRaiseStatement x) {
   }

   public void endVisit(OracleCreateDatabaseDbLinkStatement x) {
   }

   public void endVisit(OracleDropDbLinkStatement x) {
   }

   public void endVisit(OracleDataTypeIntervalYear x) {
   }

   public void endVisit(OracleDataTypeIntervalDay x) {
   }

   public void endVisit(OracleUsingIndexClause x) {
   }

   public void endVisit(OracleLobStorageClause x) {
   }

   public boolean visit(OracleUnique x) {
      return this.visit((SQLUnique)x);
   }

   public void endVisit(OracleUnique x) {
      this.endVisit((SQLUnique)x);
   }

   public boolean visit(OracleForeignKey x) {
      return this.visit((SQLForeignKeyImpl)x);
   }

   public void endVisit(OracleForeignKey x) {
      this.endVisit((SQLForeignKeyImpl)x);
   }

   public boolean visit(OracleCheck x) {
      return this.visit((SQLCheck)x);
   }

   public void endVisit(OracleCheck x) {
      this.endVisit((SQLCheck)x);
   }

   public boolean visit(OracleSupplementalIdKey x) {
      return true;
   }

   public void endVisit(OracleSupplementalIdKey x) {
   }

   public boolean visit(OracleSupplementalLogGrp x) {
      return true;
   }

   public void endVisit(OracleSupplementalLogGrp x) {
   }

   public void endVisit(OracleCreateTableStatement.Organization x) {
   }

   public void endVisit(OracleCreateTableStatement.OIDIndex x) {
   }

   public void endVisit(OracleCreatePackageStatement x) {
   }

   public void endVisit(OracleExecuteImmediateStatement x) {
   }

   public boolean visit(OracleTreatExpr x) {
      return true;
   }

   public void endVisit(OracleTreatExpr x) {
   }

   public void endVisit(OracleCreateSynonymStatement x) {
   }

   public void endVisit(OracleCreateTypeStatement x) {
   }

   public void endVisit(OraclePipeRowStatement x) {
   }

   public void endVisit(OracleIsOfTypeExpr x) {
   }

   public boolean visit(OracleRunStatement x) {
      return true;
   }

   public void endVisit(OracleRunStatement x) {
   }

   public void endVisit(OracleXmlColumnProperties x) {
   }

   public void endVisit(OracleXmlColumnProperties.OracleXMLTypeStorage x) {
   }

   public boolean visit(OracleXmlContentExpr x) {
      return true;
   }

   public void endVisit(OracleXmlContentExpr x) {
   }

   public boolean visit(OracleMethodInvokeAccessExpr x) {
      return true;
   }

   public void endVisit(OracleMethodInvokeAccessExpr x) {
   }

   public boolean visit(OracleMultisetExpr x) {
      return true;
   }

   public void endVisit(OracleMultisetExpr x) {
   }

   public boolean visit(OracleJsonObjectExpr x) {
      return true;
   }

   public void endVisit(OracleJsonObjectExpr x) {
   }

   public boolean visit(OracleJsonObjectExpr.OracleJsonObjectExprItem x) {
      return true;
   }

   public void endVisit(OracleJsonObjectExpr.OracleJsonObjectExprItem x) {
   }

   public boolean visit(OracleJsonObjectExpr.OracleJsonObjectOnNullClause x) {
      return true;
   }

   public void endVisit(OracleJsonObjectExpr.OracleJsonObjectOnNullClause x) {
   }

   public boolean visit(OracleJsonObjectExpr.OracleJsonObjectReturnClause x) {
      return true;
   }

   public void endVisit(OracleJsonObjectExpr.OracleJsonObjectReturnClause x) {
   }

   public boolean visit(OracleJsonArrayAggExpr x) {
      return true;
   }

   public void endVisit(OracleJsonArrayAggExpr x) {
   }

   public boolean visit(OracleJsonArrayAggExpr.OracleJsonAggArrayOnNullClause x) {
      return true;
   }

   public void endVisit(OracleJsonArrayAggExpr.OracleJsonAggArrayOnNullClause x) {
   }

   public boolean visit(OracleJsonArrayAggExpr.OracleJsonAggArrayReturnClause x) {
      return true;
   }

   public void endVisit(OracleJsonArrayAggExpr.OracleJsonAggArrayReturnClause x) {
   }
}
