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

import com.chenyang.druid.sql.ast.SQLDeclareItem;
import com.chenyang.druid.sql.dialect.mysql.ast.statement.MySqlStatementImpl;
import com.chenyang.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;
   }
}
