Start of new ANTLR4 based parser.
Very simple tests pass.
This commit is contained in:
parent
03b4194193
commit
fbbe832a05
44 changed files with 860 additions and 8 deletions
29
pglablib/sqlast/SelectList.h
Normal file
29
pglablib/sqlast/SelectList.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include "Node.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace sqlast {
|
||||
|
||||
class SelectItem;
|
||||
|
||||
class SelectList : public Node
|
||||
{
|
||||
public:
|
||||
SelectList();
|
||||
|
||||
void Add(std::unique_ptr<SelectItem> select_item);
|
||||
int Count() const;
|
||||
|
||||
SelectItem& Get(int index)
|
||||
{
|
||||
return *list.at(index);
|
||||
}
|
||||
private:
|
||||
using List = std::vector<std::unique_ptr<SelectItem>>;
|
||||
|
||||
List list;
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue