package com.chenyang.druid.sql.dialect.mariadb.ast.statement;

import com.chenyang.druid.sql.ast.SQLExpr;
import com.chenyang.druid.sql.ast.statement.SQLExprTableSource;
import com.chenyang.druid.sql.dialect.mariadb.visitor.MariadbASTVisitor;
import java.util.ArrayList;
import java.util.List;

public class MariadbRepairTableStatement extends MariadbStatementImpl {
   private boolean noWriteToBinlog = false;
   private boolean local = false;
   protected final List<SQLExprTableSource> tableSources = new ArrayList();
   private List<SQLExpr> identifiedList = new ArrayList();

   public void accept0(MariadbASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.tableSources);
      }

      visitor.endVisit(this);
   }

   public boolean isNoWriteToBinlog() {
      return this.noWriteToBinlog;
   }

   public void setNoWriteToBinlog(boolean noWriteToBinlog) {
      this.noWriteToBinlog = noWriteToBinlog;
   }

   public boolean isLocal() {
      return this.local;
   }

   public void setLocal(boolean local) {
      this.local = local;
   }

   public List<SQLExprTableSource> getTableSources() {
      return this.tableSources;
   }

   public void addTableSource(SQLExprTableSource tableSource) {
      if (tableSource != null) {
         tableSource.setParent(this);
      }

      this.tableSources.add(tableSource);
   }

   public List<SQLExpr> getIdentifiedList() {
      return this.identifiedList;
   }

   public void setIdentifiedList(List<SQLExpr> identifiedList) {
      this.identifiedList = identifiedList;
   }
}
