| 1 | #pragma once |
| 2 | |
| 3 | #include <vector> |
| 4 | #include <Core/Block.h> |
| 5 | |
| 6 | |
| 7 | namespace DB |
| 8 | { |
| 9 | /** Common part for implementation of MySQLBlockInputStream, MongoDBBlockInputStream and others. |
| 10 | */ |
| 11 | struct ExternalResultDescription |
| 12 | { |
| 13 | enum struct ValueType |
| 14 | { |
| 15 | vtUInt8, |
| 16 | vtUInt16, |
| 17 | vtUInt32, |
| 18 | vtUInt64, |
| 19 | vtInt8, |
| 20 | vtInt16, |
| 21 | vtInt32, |
| 22 | vtInt64, |
| 23 | vtFloat32, |
| 24 | vtFloat64, |
| 25 | vtString, |
| 26 | vtDate, |
| 27 | vtDateTime, |
| 28 | vtUUID, |
| 29 | }; |
| 30 | |
| 31 | Block sample_block; |
| 32 | std::vector<std::pair<ValueType, bool /* is_nullable */>> types; |
| 33 | |
| 34 | void init(const Block & sample_block_); |
| 35 | }; |
| 36 | |
| 37 | } |
| 38 | |