mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 13:13:36 +00:00
495c6e03aa
* 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
37 lines
554 B
C++
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>;
|
|
|
|
}
|