2011-11-28 04:05:53 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <DB/DataStreams/PrettyBlockOutputStream.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/** Выводит результат в виде красивых таблиц, но с меньшим количеством строк-разделителей.
|
|
|
|
|
*/
|
|
|
|
|
class PrettyCompactBlockOutputStream : public PrettyBlockOutputStream
|
|
|
|
|
{
|
|
|
|
|
public:
|
2012-06-25 05:07:34 +00:00
|
|
|
|
PrettyCompactBlockOutputStream(WriteBuffer & ostr_, bool no_escapes_ = false, size_t max_rows_ = PRETTY_FORMAT_DEFAULT_MAX_ROWS)
|
|
|
|
|
: PrettyBlockOutputStream(ostr_, no_escapes_, max_rows_) {}
|
2011-11-28 04:05:53 +00:00
|
|
|
|
|
2014-11-08 23:52:18 +00:00
|
|
|
|
void write(const Block & block) override;
|
|
|
|
|
|
2013-06-18 09:56:11 +00:00
|
|
|
|
protected:
|
|
|
|
|
void writeHeader(const Block & block, const Widths_t & max_widths, const Widths_t & name_widths);
|
|
|
|
|
void writeBottom(const Widths_t & max_widths);
|
|
|
|
|
void writeRow(size_t row_id, const Block & block, const Widths_t & max_widths, const Widths_t & name_widths);
|
2011-11-28 04:05:53 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|