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

import com.chenyang.druid.sql.ast.SQLObject;
import com.chenyang.druid.sql.ast.expr.SQLIdentifierExpr;
import com.chenyang.druid.sql.ast.statement.SQLAlterTableItem;
import com.chenyang.druid.sql.dialect.mysql.ast.MySqlObjectImpl;
import com.chenyang.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

public class MySqlAlterTableOption extends MySqlObjectImpl implements SQLAlterTableItem {
   private String name;
   private SQLObject value;

   public MySqlAlterTableOption(String name, String value) {
      this(name, (SQLObject)(new SQLIdentifierExpr(value)));
   }

   public MySqlAlterTableOption(String name, SQLObject value) {
      this.name = name;
      this.setValue(value);
   }

   public MySqlAlterTableOption() {
   }

   public void accept0(MySqlASTVisitor visitor) {
      visitor.visit(this);
      visitor.endVisit(this);
   }

   public String getName() {
      return this.name;
   }

   public void setName(String name) {
      this.name = name;
   }

   public SQLObject getValue() {
      return this.value;
   }

   public void setValue(SQLObject value) {
      this.value = value;
   }
}
