package com.alibaba.druid.sql.dialect.mysql.ast.clause;

import com.alibaba.druid.sql.ast.SQLDeclareItem;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlStatementImpl;
import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;
import java.util.ArrayList;
import java.util.List;

public class MySqlDeclareStatement extends MySqlStatementImpl {
   private List<SQLDeclareItem> varList = new ArrayList();

   public List<SQLDeclareItem> getVarList() {
      return this.varList;
   }

   public void addVar(SQLDeclareItem expr) {
      this.varList.add(expr);
   }

   public void setVarList(List<SQLDeclareItem> varList) {
      this.varList = varList;
   }

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

      visitor.endVisit(this);
   }

   public List getChildren() {
      return this.varList;
   }
}
