2012-11-10 04:43:53 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/DataStreams/IRowOutputStream.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2016-08-13 01:57:35 +00:00
|
|
|
class IColumn;
|
|
|
|
class IDataType;
|
|
|
|
class WriteBuffer;
|
|
|
|
|
|
|
|
|
2012-11-10 04:43:53 +00:00
|
|
|
/** Поток для вывода данных в бинарном построчном формате.
|
|
|
|
*/
|
|
|
|
class BinaryRowOutputStream : public IRowOutputStream
|
|
|
|
{
|
|
|
|
public:
|
2016-02-16 16:39:39 +00:00
|
|
|
BinaryRowOutputStream(WriteBuffer & ostr_);
|
2012-11-10 04:43:53 +00:00
|
|
|
|
2016-02-16 16:39:39 +00:00
|
|
|
void writeField(const IColumn & column, const IDataType & type, size_t row_num) override;
|
2012-11-10 04:43:53 +00:00
|
|
|
|
2016-08-13 01:57:35 +00:00
|
|
|
void flush() override;
|
2014-08-14 20:27:41 +00:00
|
|
|
|
2015-10-29 20:38:37 +00:00
|
|
|
String getContentType() const override { return "application/octet-stream"; }
|
|
|
|
|
2012-11-10 04:43:53 +00:00
|
|
|
protected:
|
|
|
|
WriteBuffer & ostr;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|