1#pragma once
2
3#include <Processors/Formats/IRowOutputFormat.h>
4#include <Core/Block.h>
5
6
7namespace DB
8{
9
10class IColumn;
11class IDataType;
12class WriteBuffer;
13
14
15/** A stream for outputting data in a binary line-by-line format.
16 */
17class BinaryRowOutputFormat: public IRowOutputFormat
18{
19public:
20 BinaryRowOutputFormat(WriteBuffer & out_, const Block & header, bool with_names_, bool with_types_, FormatFactory::WriteCallback callback);
21
22 String getName() const override { return "BinaryRowOutputFormat"; }
23
24 void writeField(const IColumn & column, const IDataType & type, size_t row_num) override;
25 void writePrefix() override;
26
27 String getContentType() const override { return "application/octet-stream"; }
28
29protected:
30 bool with_names;
31 bool with_types;
32};
33
34}
35