blob: 5af9be05261801c879fde80d3c8589301d2faa22 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#pragma once
#if USE_CAPNP
#include <Core/Block.h>
#error #include <capnp/dynamic.h>
#include <Formats/FormatSettings.h>
namespace DB
{
class CapnProtoSerializer
{
public:
CapnProtoSerializer(const DataTypes & data_types, const Names & names, const capnp::StructSchema & schema, const FormatSettings::CapnProto & settings);
void writeRow(const Columns & columns, capnp::DynamicStruct::Builder builder, size_t row_num);
void readRow(MutableColumns & columns, capnp::DynamicStruct::Reader & reader);
~CapnProtoSerializer();
private:
class Impl;
std::unique_ptr<Impl> serializer_impl;
};
}
#endif
|