mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
33 lines
807 B
C++
33 lines
807 B
C++
#pragma once
|
|
|
|
#include <Processors/Formats/Impl/JSONColumnsBlockOutputFormatBase.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/* Format JSONColumns outputs all data as a single block in the next format:
|
|
* {
|
|
* "name1": [value1, value2, value3, ...],
|
|
* "name2": [value1, value2, value3, ...],
|
|
* ...
|
|
* }
|
|
*/
|
|
class JSONColumnsBlockOutputFormat : public JSONColumnsBlockOutputFormatBase
|
|
{
|
|
public:
|
|
JSONColumnsBlockOutputFormat(WriteBuffer & out_, const Block & header_, const FormatSettings & format_settings_, bool validate_utf8, size_t indent_ = 0);
|
|
|
|
String getName() const override { return "JSONColumnsBlockOutputFormat"; }
|
|
|
|
protected:
|
|
void writeChunkStart() override;
|
|
void writeChunkEnd() override;
|
|
|
|
void writeColumnStart(size_t column_index) override;
|
|
|
|
Names names;
|
|
size_t indent;
|
|
};
|
|
|
|
}
|