2011-10-24 12:10:59 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <DB/DataStreams/IBlockInputStream.h>
|
|
|
|
|
#include <DB/DataStreams/IBlockOutputStream.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
|
{
|
|
|
|
|
|
2016-02-13 06:37:19 +00:00
|
|
|
|
class Context;
|
|
|
|
|
|
2011-10-24 12:10:59 +00:00
|
|
|
|
/** Позволяет создать IBlockInputStream или IBlockOutputStream по названию формата.
|
2011-10-30 05:19:41 +00:00
|
|
|
|
* Замечание: формат и сжатие - независимые вещи.
|
2011-10-24 12:10:59 +00:00
|
|
|
|
*/
|
|
|
|
|
class FormatFactory
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
BlockInputStreamPtr getInput(const String & name, ReadBuffer & buf,
|
2016-02-13 06:37:19 +00:00
|
|
|
|
const Block & sample, const Context & context, size_t max_block_size) const;
|
2015-05-28 03:49:28 +00:00
|
|
|
|
|
2011-10-24 12:10:59 +00:00
|
|
|
|
BlockOutputStreamPtr getOutput(const String & name, WriteBuffer & buf,
|
2016-02-13 06:37:19 +00:00
|
|
|
|
const Block & sample, const Context & context) const;
|
2011-10-24 12:10:59 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|