ClickHouse/dbms/include/DB/DataStreams/JSONCompactRowOutputStream.h

32 lines
683 B
C
Raw Normal View History

#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
{
2013-05-20 12:21:51 +00:00
/** Поток для вывода данных в формате JSONCompact.
*/
class JSONCompactRowOutputStream : public JSONRowOutputStream
{
public:
2013-05-22 14:57:43 +00:00
JSONCompactRowOutputStream(WriteBuffer & ostr_, const Block & sample_);
void writeField(const Field & field) override;
void writeFieldDelimiter() override;
void writeRowStartDelimiter() override;
void writeRowEndDelimiter() override;
protected:
void writeTotals() override;
void writeExtremes() override;
};
}