mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
38 lines
860 B
C++
38 lines
860 B
C++
#pragma once
|
|
|
|
#if !defined(ARCADIA_BUILD)
|
|
# include "config_formats.h"
|
|
# include "config_core.h"
|
|
#endif
|
|
|
|
#if USE_MSGPACK
|
|
|
|
#include <Core/Block.h>
|
|
#include <IO/WriteBuffer.h>
|
|
#include <Processors/Formats/IRowOutputFormat.h>
|
|
#include <Formats/FormatSettings.h>
|
|
#include <msgpack.hpp>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class MsgPackRowOutputFormat : public IRowOutputFormat
|
|
{
|
|
public:
|
|
MsgPackRowOutputFormat(WriteBuffer & out_, const Block & header_, const RowOutputFormatParams & params_);
|
|
|
|
String getName() const override { return "MsgPackRowOutputFormat"; }
|
|
|
|
void write(const Columns & columns, size_t row_num) override;
|
|
void writeField(const IColumn &, const ISerialization &, size_t) override {}
|
|
void serializeField(const IColumn & column, DataTypePtr data_type, size_t row_num);
|
|
|
|
private:
|
|
msgpack::packer<DB::WriteBuffer> packer;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|