ClickHouse/dbms/Storages/ColumnDefault.h
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

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 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>;
}