ClickHouse/src/Processors/Formats/Impl/MsgPackRowOutputFormat.h

38 lines
860 B
C++
Raw Normal View History

2020-03-12 17:19:40 +00:00
#pragma once
2020-07-16 11:08:26 +00:00
#if !defined(ARCADIA_BUILD)
# include "config_formats.h"
# include "config_core.h"
#endif
2020-07-10 19:08:18 +00:00
#if USE_MSGPACK
2020-03-12 17:19:40 +00:00
#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_);
2020-03-12 17:19:40 +00:00
String getName() const override { return "MsgPackRowOutputFormat"; }
void write(const Columns & columns, size_t row_num) override;
2021-03-09 14:46:52 +00:00
void writeField(const IColumn &, const ISerialization &, size_t) override {}
2020-03-12 17:19:40 +00:00
void serializeField(const IColumn & column, DataTypePtr data_type, size_t row_num);
private:
msgpack::packer<DB::WriteBuffer> packer;
};
}
2020-07-10 19:08:18 +00:00
#endif