2014-07-31 09:11:49 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <DataTypes/IDataType.h>
|
2014-07-31 09:11:49 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-04-16 15:00:33 +00:00
|
|
|
/** Knows the names and types of all possible virtual columns.
|
|
|
|
* It is necessary for engines that redirect a request to other tables without knowing in advance what virtual columns they contain.
|
2014-07-31 09:11:49 +00:00
|
|
|
*/
|
|
|
|
class VirtualColumnFactory
|
|
|
|
{
|
|
|
|
public:
|
2017-04-01 07:20:54 +00:00
|
|
|
static bool hasColumn(const String & name);
|
|
|
|
static DataTypePtr getType(const String & name);
|
2014-07-31 09:11:49 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
static DataTypePtr tryGetType(const String & name);
|
2014-07-31 09:11:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|