ClickHouse/src/Processors/Formats/Impl/ValuesRowOutputFormat.h
2022-02-06 07:14:01 +03:00

33 lines
858 B
C++

#pragma once
#include <Formats/FormatSettings.h>
#include <Processors/Formats/IRowOutputFormat.h>
namespace DB
{
class WriteBuffer;
/** A stream for outputting data in the VALUES format (as in the INSERT request).
*/
class ValuesRowOutputFormat final : public IRowOutputFormat
{
public:
ValuesRowOutputFormat(WriteBuffer & out_, const Block & header_, const RowOutputFormatParams & params_, const FormatSettings & format_settings_);
String getName() const override { return "ValuesRowOutputFormat"; }
private:
void writeField(const IColumn & column, const ISerialization & serialization, size_t row_num) override;
void writeFieldDelimiter() override;
void writeRowStartDelimiter() override;
void writeRowEndDelimiter() override;
void writeRowBetweenDelimiter() override;
const FormatSettings format_settings;
};
}