mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
32 lines
755 B
C++
32 lines
755 B
C++
#pragma once
|
|
|
|
#include <Processors/Formats/IRowOutputFormat.h>
|
|
#include <Core/Block.h>
|
|
|
|
#include <Core/PostgreSQLProtocol.h>
|
|
#include <Formats/FormatSettings.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
//// https://www.postgresql.org/docs/current/protocol-flow.html#id-1.10.5.7.4
|
|
class PostgreSQLOutputFormat final : public IOutputFormat
|
|
{
|
|
public:
|
|
PostgreSQLOutputFormat(WriteBuffer & out_, const Block & header_, const FormatSettings & settings_);
|
|
|
|
String getName() const override {return "PostgreSQLOutputFormat";}
|
|
|
|
void flush() override;
|
|
|
|
private:
|
|
void writePrefix() override;
|
|
void consume(Chunk) override;
|
|
|
|
FormatSettings format_settings;
|
|
PostgreSQLProtocol::Messaging::MessageTransport message_transport;
|
|
Serializations serializations;
|
|
};
|
|
|
|
}
|