| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <Formats/FormatSettings.h> |
| 4 | #include <Processors/Formats/IRowOutputFormat.h> |
| 5 | |
| 6 | |
| 7 | namespace DB |
| 8 | { |
| 9 | |
| 10 | class WriteBuffer; |
| 11 | |
| 12 | |
| 13 | /** A stream for outputting data in the VALUES format (as in the INSERT request). |
| 14 | */ |
| 15 | class ValuesRowOutputFormat : public IRowOutputFormat |
| 16 | { |
| 17 | public: |
| 18 | ValuesRowOutputFormat(WriteBuffer & out_, const Block & header_, FormatFactory::WriteCallback callback, const FormatSettings & format_settings_); |
| 19 | |
| 20 | String getName() const override { return "ValuesRowOutputFormat"; } |
| 21 | |
| 22 | void writeField(const IColumn & column, const IDataType & type, size_t row_num) override; |
| 23 | void writeFieldDelimiter() override; |
| 24 | void writeRowStartDelimiter() override; |
| 25 | void writeRowEndDelimiter() override; |
| 26 | void writeRowBetweenDelimiter() override; |
| 27 | |
| 28 | private: |
| 29 | const FormatSettings format_settings; |
| 30 | }; |
| 31 | |
| 32 | } |
| 33 |