40 lines
772 B
C
40 lines
772 B
C
|
|
#ifndef SQLASTSELECT_H
|
|||
|
|
#define SQLASTSELECT_H
|
|||
|
|
|
|||
|
|
#include "SqlAstNode.h"
|
|||
|
|
//#include "SqlAstSelectList.h"
|
|||
|
|
#include <memory>
|
|||
|
|
|
|||
|
|
class SqlParser;
|
|||
|
|
|
|||
|
|
namespace SqlAst {
|
|||
|
|
|
|||
|
|
class SelectList;
|
|||
|
|
class From;
|
|||
|
|
class Where;
|
|||
|
|
class GroupBy;
|
|||
|
|
class Having;
|
|||
|
|
class OrderBy;
|
|||
|
|
|
|||
|
|
class Select: public CrudNode {
|
|||
|
|
public:
|
|||
|
|
|
|||
|
|
void setSelectList(std::shared_ptr<SelectList> list) { select = list; }
|
|||
|
|
auto getSelectList() const { return select; }
|
|||
|
|
void setFrom(std::shared_ptr<From> f) { from = f; }
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
std::shared_ptr<SelectList> select;
|
|||
|
|
std::shared_ptr<From> from;
|
|||
|
|
std::shared_ptr<Where> where;
|
|||
|
|
std::shared_ptr<GroupBy> groupBy;
|
|||
|
|
std::shared_ptr<Having> having;
|
|||
|
|
std::shared_ptr<OrderBy> orderBy;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
std::shared_ptr<SqlAst::Select> parseSelect(SqlParser &parser);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#endif // SQLASTSELECT_H
|