ClickHouse/src/Storages/ColumnDefault.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
605 B
C++
Raw Normal View History

#pragma once
#include <Parsers/IAST.h>
2016-12-12 07:24:56 +00:00
#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;
};
2016-12-12 07:24:56 +00:00
bool operator==(const ColumnDefault & lhs, const ColumnDefault & rhs);
2016-12-12 07:24:56 +00:00
using ColumnDefaults = std::unordered_map<std::string, ColumnDefault>;
}