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

import com.chenyang.druid.sql.ast.SQLExpr;
import com.chenyang.druid.sql.ast.SQLName;
import com.chenyang.druid.sql.ast.statement.SQLAlterStatement;
import com.chenyang.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

public class MySqlAlterServerStatement extends MySqlStatementImpl implements SQLAlterStatement {
   private SQLName name;
   private SQLExpr user;

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

   public void setName(SQLName name) {
      if (name != null) {
         name.setParent(this);
      }

      this.name = name;
   }

   public SQLExpr getUser() {
      return this.user;
   }

   public void setUser(SQLExpr user) {
      if (user != null) {
         user.setParent(this);
      }

      this.user = user;
   }

   public void accept0(MySqlASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.name);
         this.acceptChild(visitor, this.user);
      }

      visitor.endVisit(this);
   }
}
