blob: 3f58ccccf767852f42357a0ce424a2e337700e57 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#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 final: public IRowOutputFormat
{
public:
BinaryRowOutputFormat(WriteBuffer & out_, const Block & header, bool with_names_, bool with_types_, const FormatSettings & format_settings_);
String getName() const override { return "BinaryRowOutputFormat"; }
String getContentType() const override { return "application/octet-stream"; }
private:
void writeField(const IColumn & column, const ISerialization & serialization, size_t row_num) override;
void writePrefix() override;
bool with_names;
bool with_types;
const FormatSettings format_settings;
};
}
|