2016-04-10 02:32:59 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/Core/Block.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2016-12-08 02:49:04 +00:00
|
|
|
/** Common part for implementation of MySQLBlockInputStream, MongoDBBlockInputStream and others.
|
2016-04-10 02:32:59 +00:00
|
|
|
*/
|
|
|
|
struct ExternalResultDescription
|
|
|
|
{
|
2016-08-07 09:09:18 +00:00
|
|
|
enum struct ValueType
|
2016-04-10 02:32:59 +00:00
|
|
|
{
|
|
|
|
UInt8,
|
|
|
|
UInt16,
|
|
|
|
UInt32,
|
|
|
|
UInt64,
|
|
|
|
Int8,
|
|
|
|
Int16,
|
|
|
|
Int32,
|
|
|
|
Int64,
|
|
|
|
Float32,
|
|
|
|
Float64,
|
|
|
|
String,
|
|
|
|
Date,
|
|
|
|
DateTime
|
|
|
|
};
|
|
|
|
|
|
|
|
Block sample_block;
|
2016-08-07 09:09:18 +00:00
|
|
|
std::vector<ValueType> types;
|
2016-04-10 02:32:59 +00:00
|
|
|
std::vector<std::string> names;
|
|
|
|
ConstColumnPlainPtrs sample_columns;
|
|
|
|
|
2016-12-08 02:49:04 +00:00
|
|
|
void init(const Block & sample_block_);
|
2016-04-10 02:32:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|