#pragma once #include #include namespace DB { using ConstraintsExpressions = std::vector; struct ConstraintsDescription { std::vector constraints; ConstraintsDescription() = default; bool empty() const { return constraints.empty(); } String toString() const; static ConstraintsDescription parse(const String & str); enum class ConstraintType { CHECK = 1, ASSUME = 2, ALWAYS_TRUE = CHECK | ASSUME, ALL = CHECK | ASSUME, }; ASTs filterConstraints(ConstraintType selection) const; ConstraintsExpressions getExpressionsToCheck(const Context & context, const NamesAndTypesList & source_columns_) const; ConstraintsDescription(const ConstraintsDescription & other); ConstraintsDescription & operator=(const ConstraintsDescription & other); }; }