ClickHouse/dbms/src/Processors/Formats/Impl/BinaryRowOutputFormat.h

36 lines
742 B
C++
Raw Normal View History

2019-02-19 18:41:18 +00:00
#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:
2019-04-09 09:25:57 +00:00
BinaryRowOutputFormat(WriteBuffer & out_, const Block & header, bool with_names_, bool with_types_);
2019-02-19 18:41:18 +00:00
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;
};
}