ClickHouse/src/Storages/ColumnDefault.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

37 lines
554 B
C++

#pragma once
#include <Parsers/IAST.h>
#include <string>
#include <unordered_map>
namespace DB
{
enum class ColumnDefaultKind
{
Default,
Materialized,
Alias
};
ColumnDefaultKind columnDefaultKindFromString(const std::string & str);
std::string toString(ColumnDefaultKind kind);
struct ColumnDefault
{
ColumnDefaultKind kind = ColumnDefaultKind::Default;
ASTPtr expression;
};
bool operator==(const ColumnDefault & lhs, const ColumnDefault & rhs);
using ColumnDefaults = std::unordered_map<std::string, ColumnDefault>;
}