1 | #include <DataStreams/NativeBlockInputStream.h> |
2 | #include <DataStreams/NativeBlockOutputStream.h> |
3 | #include <Formats/FormatFactory.h> |
4 | |
5 | |
6 | namespace DB |
7 | { |
8 | |
9 | void registerInputFormatNative(FormatFactory & factory) |
10 | { |
11 | factory.registerInputFormat("Native" , []( |
12 | ReadBuffer & buf, |
13 | const Block & sample, |
14 | UInt64 /* max_block_size */, |
15 | FormatFactory::ReadCallback /* callback */, |
16 | const FormatSettings &) |
17 | { |
18 | return std::make_shared<NativeBlockInputStream>(buf, sample, 0); |
19 | }); |
20 | } |
21 | |
22 | void registerOutputFormatNative(FormatFactory & factory) |
23 | { |
24 | factory.registerOutputFormat("Native" , []( |
25 | WriteBuffer & buf, |
26 | const Block & sample, |
27 | FormatFactory::WriteCallback, |
28 | const FormatSettings &) |
29 | { |
30 | return std::make_shared<NativeBlockOutputStream>(buf, 0, sample); |
31 | }); |
32 | } |
33 | |
34 | } |
35 | |