mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-11 19:10:50 +00:00
36 lines
733 B
C++
36 lines
733 B
C++
|
#pragma once
|
||
|
|
||
|
#include <Processors/Formats/IRowOutputFormat.h>
|
||
|
#include <Core/Block.h>
|
||
|
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
class IColumn;
|
||
|
class IDataType;
|
||
|
class WriteBuffer;
|
||
|
|
||
|
|
||
|
/** A stream for outputting data in a binary line-by-line format.
|
||
|
*/
|
||
|
class BinaryRowOutputFormat: public IRowOutputFormat
|
||
|
{
|
||
|
public:
|
||
|
BinaryRowOutputFormat(WriteBuffer & out, Block header, bool with_names_, bool with_types_);
|
||
|
|
||
|
String getName() const override { return "BinaryRowOutputFormat"; }
|
||
|
|
||
|
void writeField(const IColumn & column, const IDataType & type, size_t row_num) override;
|
||
|
void writePrefix() override;
|
||
|
|
||
|
String getContentType() const override { return "application/octet-stream"; }
|
||
|
|
||
|
protected:
|
||
|
bool with_names;
|
||
|
bool with_types;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|