29 lines
493 B
C++
29 lines
493 B
C++
#include "SelectList.h"
|
|
#include "SelectItem.h"
|
|
#include "sqlast/NodeVisitor.h"
|
|
|
|
using namespace sqlast;
|
|
|
|
SelectList::SelectList()
|
|
{
|
|
}
|
|
|
|
void SelectList::Add(std::unique_ptr<SelectItem> select_item)
|
|
{
|
|
selectItems.push_back(std::move(select_item));
|
|
}
|
|
|
|
int SelectList::Count() const
|
|
{
|
|
return static_cast<int>(selectItems.size());
|
|
}
|
|
|
|
SelectItem &SelectList::Get(int index)
|
|
{
|
|
return *selectItems.at(index);
|
|
}
|
|
|
|
void SelectList::Accept(NodeVisitor &visitor)
|
|
{
|
|
visitor.Visit(*this);
|
|
}
|