29 lines
503 B
C++
29 lines
503 B
C++
#include "StatementList.h"
|
|
#include "Statement.h"
|
|
#include "sqlast/NodeVisitor.h"
|
|
|
|
using namespace sqlast;
|
|
|
|
StatementList::StatementList()
|
|
{}
|
|
|
|
void StatementList::Add(std::unique_ptr<Statement> &&statement)
|
|
{
|
|
statements.push_back(std::move(statement));
|
|
}
|
|
|
|
Statement &StatementList::Get(int index)
|
|
{
|
|
return *statements[index];
|
|
}
|
|
|
|
int StatementList::Count() const
|
|
{
|
|
return static_cast<int>(statements.size());
|
|
}
|
|
|
|
void StatementList::Accept(NodeVisitor &visitor)
|
|
{
|
|
visitor.Visit(*this);
|
|
}
|
|
|