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-01-03 15:02:00 +00:00
|
|
|
enum class Type {
|
|
|
|
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;
|
2019-05-12 11:36:02 +00:00
|
|
|
};
|
|
|
|
}
|