mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
32 lines
629 B
C++
32 lines
629 B
C++
#pragma once
|
|
|
|
#include <Poco/SharedPtr.h>
|
|
|
|
#include <DB/Core/Block.h>
|
|
#include <DB/IO/WriteBuffer.h>
|
|
#include <DB/IO/WriteBufferValidUTF8.h>
|
|
#include <DB/DataStreams/JSONRowOutputStream.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/** Поток для вывода данных в формате JSONCompact.
|
|
*/
|
|
class JSONCompactRowOutputStream : public JSONRowOutputStream
|
|
{
|
|
public:
|
|
JSONCompactRowOutputStream(WriteBuffer & ostr_, const Block & sample_);
|
|
|
|
void writeField(const Field & field);
|
|
void writeFieldDelimiter();
|
|
void writeRowStartDelimiter();
|
|
void writeRowEndDelimiter();
|
|
|
|
protected:
|
|
void writeTotals();
|
|
void writeExtremes();
|
|
};
|
|
|
|
}
|