mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
30 lines
607 B
C++
30 lines
607 B
C++
#pragma once
|
|
|
|
#include <DB/Core/Block.h>
|
|
#include <DB/IO/WriteBuffer.h>
|
|
#include <DB/DataStreams/IRowOutputStream.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/** Поток для вывода данных в бинарном построчном формате.
|
|
*/
|
|
class BinaryRowOutputStream : public IRowOutputStream
|
|
{
|
|
public:
|
|
BinaryRowOutputStream(WriteBuffer & ostr_);
|
|
|
|
void writeField(const IColumn & column, const IDataType & type, size_t row_num) override;
|
|
|
|
void flush() override { ostr.next(); }
|
|
|
|
String getContentType() const override { return "application/octet-stream"; }
|
|
|
|
protected:
|
|
WriteBuffer & ostr;
|
|
};
|
|
|
|
}
|
|
|