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

import com.alibaba.druid.DbType;
import com.alibaba.druid.sql.ast.statement.SQLAlterStatement;
import com.alibaba.druid.sql.ast.statement.SQLAlterTableStatement;
import com.alibaba.druid.sql.dialect.greenplum.visitor.GPASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;

public class GPAlterTableStatement extends SQLAlterTableStatement implements GPSQLStatement, SQLAlterStatement {
   private boolean only = false;
   private boolean allInTableSpace = false;

   public boolean isAllInTableSpace() {
      return this.allInTableSpace;
   }

   public void setAllInTableSpace(boolean allInTableSpace) {
      this.allInTableSpace = allInTableSpace;
   }

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

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

   public GPAlterTableStatement() {
      this.dbType = DbType.greenplum;
   }

   public void accept0(SQLASTVisitor visitor) {
      this.accept0((GPASTVisitor)visitor);
   }

   public void accept0(GPASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.getTableSource());
         this.acceptChild(visitor, this.getItems());
      }

      visitor.endVisit(this);
   }
}
