mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
35 lines
847 B
C++
35 lines
847 B
C++
#include <DataStreams/NativeBlockInputStream.h>
|
|
#include <DataStreams/NativeBlockOutputStream.h>
|
|
#include <Formats/FormatFactory.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
void registerInputFormatNative(FormatFactory & factory)
|
|
{
|
|
factory.registerInputFormat("Native", [](
|
|
ReadBuffer & buf,
|
|
const Block & sample,
|
|
UInt64 /* max_block_size */,
|
|
FormatFactory::ReadCallback /* callback */,
|
|
const FormatSettings &)
|
|
{
|
|
return std::make_shared<NativeBlockInputStream>(buf, sample, 0);
|
|
});
|
|
}
|
|
|
|
void registerOutputFormatNative(FormatFactory & factory)
|
|
{
|
|
factory.registerOutputFormat("Native", [](
|
|
WriteBuffer & buf,
|
|
const Block & sample,
|
|
FormatFactory::WriteCallback,
|
|
const FormatSettings &)
|
|
{
|
|
return std::make_shared<NativeBlockOutputStream>(buf, 0, sample);
|
|
});
|
|
}
|
|
|
|
}
|