This commit is contained in:
eelke 2022-04-07 19:35:29 +02:00
parent 0da32b916c
commit 698ccab6ab
20 changed files with 265 additions and 37 deletions

View file

@ -1,5 +1,6 @@
#include "SelectList.h"
#include "SelectItem.h"
#include "sqlast/NodeVisitor.h"
using namespace sqlast;
@ -9,10 +10,20 @@ SelectList::SelectList()
void SelectList::Add(std::unique_ptr<SelectItem> select_item)
{
list.push_back(std::move(select_item));
selectItems.push_back(std::move(select_item));
}
int SelectList::Count() const
{
return static_cast<int>(list.size());
return static_cast<int>(selectItems.size());
}
SelectItem &SelectList::Get(int index)
{
return *selectItems.at(index);
}
void SelectList::Accept(NodeVisitor &visitor)
{
visitor.Visit(*this);
}