ClickHouse/dbms/include/DB/DataStreams/BinaryRowOutputStream.h

32 lines
636 B
C
Raw Normal View History

#pragma once
#include <Poco/SharedPtr.h>
#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(); }
2015-10-29 20:38:37 +00:00
String getContentType() const override { return "application/octet-stream"; }
protected:
WriteBuffer & ostr;
};
}