ClickHouse/dbms/Core/ExternalResultDescription.h

38 lines
640 B
C++
Raw Normal View History

2016-04-10 02:32:59 +00:00
#pragma once
2019-02-15 11:46:07 +00:00
#include <vector>
#include <Core/Block.h>
2016-04-10 02:32:59 +00:00
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
{
enum struct ValueType
{
2019-08-03 11:02:40 +00:00
vtUInt8,
vtUInt16,
vtUInt32,
vtUInt64,
vtInt8,
vtInt16,
vtInt32,
vtInt64,
vtFloat32,
vtFloat64,
vtString,
vtDate,
vtDateTime,
vtUUID,
};
2016-04-10 02:32:59 +00:00
Block sample_block;
std::vector<std::pair<ValueType, bool /* is_nullable */>> types;
2016-04-10 02:32:59 +00:00
void init(const Block & sample_block_);
2016-04-10 02:32:59 +00:00
};
}