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

import com.alibaba.druid.DbType;
import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.ast.statement.SQLRevokeStatement;
import com.alibaba.druid.sql.dialect.mariadb.ast.MariadbObject;
import com.alibaba.druid.sql.dialect.mariadb.visitor.MariadbASTVisitor;
import com.alibaba.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;
   }
}
