mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
26 lines
461 B
C++
26 lines
461 B
C++
#include <IO/WriteBuffer.h>
|
|
#include <Columns/IColumn.h>
|
|
#include <DataTypes/IDataType.h>
|
|
#include <DataStreams/BinaryRowOutputStream.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
BinaryRowOutputStream::BinaryRowOutputStream(WriteBuffer & ostr_)
|
|
: ostr(ostr_)
|
|
{
|
|
}
|
|
|
|
void BinaryRowOutputStream::flush()
|
|
{
|
|
ostr.next();
|
|
}
|
|
|
|
void BinaryRowOutputStream::writeField(const IColumn & column, const IDataType & type, size_t row_num)
|
|
{
|
|
type.serializeBinary(column, row_num, ostr);
|
|
}
|
|
|
|
}
|