ClickHouse/src/Parsers/ASTConstraintDeclaration.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
611 B
C++
Raw Normal View History

2019-05-12 11:36:02 +00:00
#pragma once
#include <Parsers/IAST.h>
namespace DB
{
/** name CHECK logical_expr
*/
2019-05-17 04:14:13 +00:00
class ASTConstraintDeclaration : public IAST
{
2019-05-12 11:36:02 +00:00
public:
2021-11-10 17:57:59 +00:00
enum class Type : UInt8
2021-05-04 18:43:58 +00:00
{
2021-01-03 15:02:00 +00:00
CHECK,
ASSUME,
};
2019-05-12 11:36:02 +00:00
String name;
2021-01-03 15:02:00 +00:00
Type type;
2019-05-25 14:07:45 +00:00
IAST * expr;
2019-05-12 11:36:02 +00:00
String getID(char) const override { return "Constraint"; }
2019-05-25 14:07:45 +00:00
ASTPtr clone() const override;
2019-05-12 11:36:02 +00:00
2019-05-25 14:07:45 +00:00
void formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const override;
2023-03-11 19:16:06 +00:00
void forEachPointerToChild(std::function<void(void**)> f) override
{
f(reinterpret_cast<void **>(&expr));
}
2019-05-12 11:36:02 +00:00
};
2023-03-11 19:16:06 +00:00
2019-05-12 11:36:02 +00:00
}