mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 19:14:30 +00:00
37 lines
560 B
C++
37 lines
560 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
#include <Parsers/IAST.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
enum class ColumnDefaultKind
|
|
{
|
|
Default,
|
|
Materialized,
|
|
Alias
|
|
};
|
|
|
|
|
|
ColumnDefaultKind columnDefaultKindFromString(const std::string & str);
|
|
std::string toString(const ColumnDefaultKind type);
|
|
|
|
|
|
struct ColumnDefault
|
|
{
|
|
ColumnDefaultKind kind = ColumnDefaultKind::Default;
|
|
ASTPtr expression;
|
|
};
|
|
|
|
|
|
bool operator==(const ColumnDefault & lhs, const ColumnDefault & rhs);
|
|
|
|
|
|
using ColumnDefaults = std::unordered_map<std::string, ColumnDefault>;
|
|
|
|
}
|