package com.chenyang.druid.sql.dialect.gauss.ast.stmt.alterTable;

import com.chenyang.druid.sql.ast.SQLExpr;
import com.chenyang.druid.sql.ast.statement.SQLAlterTableItem;
import com.chenyang.druid.sql.dialect.gauss.ast.GaussSQLObject;
import com.chenyang.druid.sql.dialect.gauss.ast.GaussSQLObjectImpl;
import com.chenyang.druid.sql.dialect.gauss.visitor.GaussASTVisitor;
import com.chenyang.druid.sql.visitor.SQLASTVisitor;

public class GaussAlterTableCluster extends GaussSQLObjectImpl implements SQLAlterTableItem, GaussSQLObject {
   private SQLExpr index;

   public SQLExpr getIndex() {
      return this.index;
   }

   public void setIndex(SQLExpr index) {
      this.index = index;
      index.setParent(this);
   }

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

   public void accept0(GaussASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.index.accept(visitor);
      }

      visitor.endVisit(this);
   }

   public GaussAlterTableCluster clone() {
      GaussAlterTableCluster c = new GaussAlterTableCluster();
      c.setIndex(this.index.clone());
      return c;
   }

   public static enum Type {
      all,
      user;
   }
}
