2015-04-11 03:10:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Storages/ColumnDefault.h>
|
|
|
|
#include <Core/NamesAndTypes.h>
|
2015-04-11 03:10:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
template <bool store>
|
|
|
|
struct ColumnsDescription
|
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
template <typename T>
|
2017-12-25 04:01:46 +00:00
|
|
|
using by_value_or_cref = std::conditional_t<store, T, const T &>;
|
2015-04-11 03:10:23 +00:00
|
|
|
|
2017-12-25 21:57:29 +00:00
|
|
|
by_value_or_cref<NamesAndTypesList> columns;
|
|
|
|
by_value_or_cref<NamesAndTypesList> materialized;
|
|
|
|
by_value_or_cref<NamesAndTypesList> alias;
|
2017-04-01 07:20:54 +00:00
|
|
|
by_value_or_cref<ColumnDefaults> defaults;
|
2015-04-11 03:10:23 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
String toString() const;
|
2015-04-11 03:10:23 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
static ColumnsDescription parse(const String & str);
|
2015-04-11 03:10:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|