ClickHouse/dbms/src/Formats/IRowOutputStream.cpp

27 lines
459 B
C++
Raw Normal View History

#include <Core/Block.h>
#include <Formats/IRowOutputStream.h>
2010-03-04 19:20:28 +00:00
namespace DB
{
void IRowOutputStream::write(const Block & block, size_t row_num)
2010-03-04 19:20:28 +00:00
{
size_t columns = block.columns();
writeRowStartDelimiter();
2010-03-04 19:20:28 +00:00
for (size_t i = 0; i < columns; ++i)
{
if (i != 0)
writeFieldDelimiter();
auto & col = block.getByPosition(i);
writeField(*col.column, *col.type, row_num);
}
writeRowEndDelimiter();
2010-03-04 19:20:28 +00:00
}
}