mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 19:12:03 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
27 lines
646 B
C++
27 lines
646 B
C++
#pragma once
|
|
|
|
#include <Parsers/ASTConstraintDeclaration.h>
|
|
#include <Interpreters/ExpressionAnalyzer.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
using ConstraintsASTs = std::vector<std::shared_ptr<ASTConstraintDeclaration>>;
|
|
using ConstraintsExpressions = std::vector<ExpressionActionsPtr>;
|
|
|
|
struct ConstraintsDescription
|
|
{
|
|
ConstraintsASTs constraints;
|
|
|
|
ConstraintsDescription() = default;
|
|
|
|
bool empty() const { return constraints.empty(); }
|
|
String toString() const;
|
|
|
|
static ConstraintsDescription parse(const String & str);
|
|
|
|
ConstraintsExpressions getExpressions(const Context & context, const NamesAndTypesList & source_columns_) const;
|
|
};
|
|
|
|
}
|