void PrettySpaceBlockOutputStream::writeSuffix()
{
    if (total_rows >= max_rows)
    {
        writeCString("\nShowed first ", ostr);
        writeIntText(max_rows, ostr);
        writeCString(".\n", ostr);
    }

    total_rows = 0;
    writeTotals();
    writeExtremes();
}
void VerticalRowOutputStream::writeSuffix()
{
    if (row_number > format_settings.pretty.max_rows)
    {
        writeCString("Showed first ", ostr);
        writeIntText(format_settings.pretty.max_rows, ostr);
        writeCString(".\n", ostr);
    }

    if (totals || extremes)
    {
        writeCString("\n", ostr);
        writeTotals();
        writeExtremes();
    }
}
void XMLRowOutputStream::writeSuffix()
{
	writeCString("\t</data>\n", *ostr);

	writeTotals();
	writeExtremes();

	writeCString("\t<rows>", *ostr);
	writeIntText(row_count, *ostr);
	writeCString("</rows>\n", *ostr);

	writeRowsBeforeLimitAtLeast();

	writeCString("</result>\n", *ostr);
	ostr->next();
}
void JSONRowOutputStream::writeSuffix()
{
    writeChar('\n', *ostr);
    writeCString("\t]", *ostr);

    writeTotals();
    writeExtremes();

    writeCString(",\n\n", *ostr);
    writeCString("\t\"rows\": ", *ostr);
    writeIntText(row_count, *ostr);

    writeRowsBeforeLimitAtLeast();

    if (write_statistics)
        writeStatistics();

    writeChar('\n', *ostr);
    writeCString("}\n", *ostr);
    ostr->next();
}
void TabSeparatedRowOutputStream::writeSuffix()
{
    writeTotals();
    writeExtremes();
}
void CSVRowOutputStream::writeSuffix()
{
	writeTotals();
	writeExtremes();
}