pgLab/pglablib/sqlast/Node.h

38 lines
638 B
C
Raw Permalink Normal View History

#pragma once
2022-04-07 19:35:29 +02:00
#include <QString>
#include <stdexcept>
#include <typeinfo>
namespace sqlast {
2022-04-07 19:35:29 +02:00
class NodeVisitor;
class Node {
public:
Node();
virtual ~Node() = default;
2022-04-07 19:35:29 +02:00
virtual void Accept(NodeVisitor &visitor) = 0;
/// Every derived class that has child nodes should override these
/// to facilitate
// virtual int ChildCount() const { return 0; }
// virtual const Node* GetChild(int index) const { throw std::out_of_range("GetChild"); }
virtual QString ToString() const;
};
}
/*
- Node
- INSERT
- UPDATE
- DELETE
- SELECT
- WITH
- CTE
*/