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

import com.chenyang.druid.DbType;
import com.chenyang.druid.sql.ast.SQLStatement;
import com.chenyang.druid.sql.ast.statement.SQLRevokeStatement;
import com.chenyang.druid.sql.dialect.mariadb.ast.MariadbObject;
import com.chenyang.druid.sql.dialect.mariadb.visitor.MariadbASTVisitor;
import com.chenyang.druid.sql.visitor.SQLASTVisitor;

public class MariadbRevokeStatement extends SQLRevokeStatement implements SQLStatement, MariadbObject {
   private boolean ignoreUnknownUser;
   private boolean ifExists;

   public MariadbRevokeStatement(DbType dbType) {
      super(dbType);
   }

   public void accept0(MariadbASTVisitor visitor) {
      if (visitor.visit(this)) {
         this.acceptChild(visitor, this.privileges);
         this.acceptChild(visitor, this.resource);
         this.acceptChild(visitor, this.users);
      }

      visitor.endVisit(this);
   }

   protected void accept0(SQLASTVisitor visitor) {
      this.accept0((MariadbASTVisitor)visitor);
   }

   public boolean isIfExists() {
      return this.ifExists;
   }

   public void setIfExists(boolean ifExists) {
      this.ifExists = ifExists;
   }

   public boolean isIgnoreUnknownUser() {
      return this.ignoreUnknownUser;
   }

   public void setIgnoreUnknownUser(boolean ignoreUnknownUser) {
      this.ignoreUnknownUser = ignoreUnknownUser;
   }
}
