2015-04-11 03:10:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/Storages/ColumnDefault.h>
|
|
|
|
#include <DB/Core/NamesAndTypes.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
template <bool store>
|
|
|
|
struct ColumnsDescription
|
|
|
|
{
|
|
|
|
template <typename T>
|
|
|
|
using by_value_or_cref = typename std::conditional<store, T, const T &>::type;
|
|
|
|
|
|
|
|
by_value_or_cref<NamesAndTypesList> columns;
|
|
|
|
by_value_or_cref<NamesAndTypesList> materialized;
|
|
|
|
by_value_or_cref<NamesAndTypesList> alias;
|
|
|
|
by_value_or_cref<ColumnDefaults> defaults;
|
|
|
|
|
|
|
|
String toString() const;
|
|
|
|
|
2015-05-28 03:49:28 +00:00
|
|
|
static ColumnsDescription parse(const String & str);
|
2015-04-11 03:10:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|