mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
39 lines
605 B
C++
39 lines
605 B
C++
#pragma once
|
|
|
|
#include <Parsers/IAST.h>
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
enum class ColumnDefaultKind
|
|
{
|
|
Default,
|
|
Materialized,
|
|
Alias,
|
|
Ephemeral
|
|
};
|
|
|
|
|
|
ColumnDefaultKind columnDefaultKindFromString(const std::string & str);
|
|
std::string toString(ColumnDefaultKind kind);
|
|
|
|
|
|
struct ColumnDefault
|
|
{
|
|
ColumnDefaultKind kind = ColumnDefaultKind::Default;
|
|
ASTPtr expression;
|
|
bool ephemeral_default = false;
|
|
};
|
|
|
|
|
|
bool operator==(const ColumnDefault & lhs, const ColumnDefault & rhs);
|
|
|
|
|
|
using ColumnDefaults = std::unordered_map<std::string, ColumnDefault>;
|
|
|
|
}
|