mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-11 18:14:03 +00:00
28 lines
723 B
C++
28 lines
723 B
C++
#pragma once
|
|
|
|
#include <DB/DataTypes/DataTypeFactory.h>
|
|
|
|
#include <DB/DataStreams/IBlockInputStream.h>
|
|
#include <DB/DataStreams/IBlockOutputStream.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/** Позволяет создать IBlockInputStream или IBlockOutputStream по названию формата.
|
|
* Замечание: формат и сжатие - независимые вещи.
|
|
*/
|
|
class FormatFactory
|
|
{
|
|
public:
|
|
BlockInputStreamPtr getInput(const String & name, ReadBuffer & buf,
|
|
Block & sample, size_t max_block_size, DataTypeFactory & data_type_factory) const;
|
|
|
|
BlockOutputStreamPtr getOutput(const String & name, WriteBuffer & buf,
|
|
Block & sample) const;
|
|
};
|
|
|
|
typedef SharedPtr<FormatFactory> FormatFactoryPtr;
|
|
|
|
}
|