ClickHouse/src/Storages/ConstraintsDescription.h
Ivan 495c6e03aa
Replace all Context references with std::weak_ptr (#22297)
* Replace all Context references with std::weak_ptr

* Fix shared context captured by value

* Fix build

* Fix Context with named sessions

* Fix copy context

* Fix gcc build

* Merge with master and fix build

* Fix gcc-9 build
2021-04-11 02:33:54 +03:00

29 lines
709 B
C++

#pragma once
#include <Parsers/ASTConstraintDeclaration.h>
#include <Interpreters/ExpressionActions.h>
namespace DB
{
using ConstraintsExpressions = std::vector<ExpressionActionsPtr>;
struct ConstraintsDescription
{
std::vector<ASTPtr> constraints;
ConstraintsDescription() = default;
bool empty() const { return constraints.empty(); }
String toString() const;
static ConstraintsDescription parse(const String & str);
ConstraintsExpressions getExpressions(ContextPtr context, const NamesAndTypesList & source_columns_) const;
ConstraintsDescription(const ConstraintsDescription & other);
ConstraintsDescription & operator=(const ConstraintsDescription & other);
};
}