2013-05-15 11:48:00 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#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:
|
2016-10-10 09:04:56 +00:00
|
|
|
JSONCompactRowOutputStream(WriteBuffer & ostr_, const Block & sample_, bool write_statistics_, bool force_quoting_64bit_integers_ = true);
|
2013-05-15 11:48:00 +00:00
|
|
|
|
2016-02-16 16:39:39 +00:00
|
|
|
void writeField(const IColumn & column, const IDataType & type, size_t row_num) override;
|
2014-11-08 23:52:18 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
}
|