package com.alibaba.druid.sql.dialect.hive.ast.stmt;

import com.alibaba.druid.DbType;
import com.alibaba.druid.sql.ast.statement.SQLUpdateStatement;
import com.alibaba.druid.sql.dialect.gauss.ast.stmt.GaussSQLStatement;
import com.alibaba.druid.sql.dialect.gauss.visitor.GaussASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class HiveUpdateStatement extends SQLUpdateStatement implements GaussSQLStatement {
   private boolean only = false;

   public HiveUpdateStatement() {
      super(DbType.gauss);
   }

   public boolean isOnly() {
      return this.only;
   }

   public void setOnly(boolean only) {
      this.only = only;
   }

   protected void accept0(SQLASTVisitor visitor) {
      if (visitor instanceof GaussASTVisitor) {
         this.accept0((GaussASTVisitor)visitor);
      } else {
         super.accept0(visitor);
      }
   }

   public void accept0(GaussASTVisitor visitor) {
      if (visitor.visit((SQLUpdateStatement)this)) {
         this.acceptChild(visitor);
      }

      visitor.endVisit((SQLUpdateStatement)this);
   }
}
