2013-05-15 11:48:00 +00:00
|
|
|
#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.
|
2013-05-15 11:48:00 +00:00
|
|
|
*/
|
|
|
|
class JSONCompactRowOutputStream : public JSONRowOutputStream
|
|
|
|
{
|
|
|
|
public:
|
2013-05-22 14:57:43 +00:00
|
|
|
JSONCompactRowOutputStream(WriteBuffer & ostr_, const Block & sample_);
|
2013-05-15 11:48:00 +00:00
|
|
|
|
2014-11-08 23:52:18 +00:00
|
|
|
void writeField(const Field & field) override;
|
|
|
|
void writeFieldDelimiter() override;
|
|
|
|
void writeRowStartDelimiter() override;
|
|
|
|
void writeRowEndDelimiter() override;
|
2013-09-01 04:55:41 +00:00
|
|
|
|
|
|
|
protected:
|
2014-11-08 23:52:18 +00:00
|
|
|
void writeTotals() override;
|
|
|
|
void writeExtremes() override;
|
2013-05-15 11:48:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|