2013-06-17 12:40:44 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
|
2013-06-18 09:56:11 +00:00
|
|
|
|
#include <DB/DataStreams/PrettyCompactBlockOutputStream.h>
|
2013-06-17 12:40:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/** Тоже самое, что и PrettyCompactBlockOutputStream, но выводит все max_rows (или меньше,
|
|
|
|
|
* если результат содержит меньшее число строк) одним блоком с одной шапкой.
|
|
|
|
|
*/
|
2013-06-18 09:56:11 +00:00
|
|
|
|
class PrettyCompactMonoBlockOutputStream : public PrettyCompactBlockOutputStream
|
2013-06-17 12:40:44 +00:00
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
PrettyCompactMonoBlockOutputStream(WriteBuffer & ostr_, bool no_escapes_ = false, size_t max_rows_ = PRETTY_FORMAT_DEFAULT_MAX_ROWS)
|
2013-06-18 09:56:11 +00:00
|
|
|
|
: PrettyCompactBlockOutputStream(ostr_, no_escapes_, max_rows_) {}
|
2013-06-17 12:40:44 +00:00
|
|
|
|
|
|
|
|
|
void write(const Block & block);
|
|
|
|
|
void writeSuffix();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
typedef std::vector<Block> Blocks_t;
|
|
|
|
|
|
|
|
|
|
Blocks_t blocks;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|