mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
38 lines
569 B
C++
38 lines
569 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 operator==(const ColumnDefault & lhs, const ColumnDefault & rhs);
|
|
|
|
|
|
using ColumnDefaults = std::unordered_map<std::string, ColumnDefault>;
|
|
|
|
}
|