2012-11-10 04:43:53 +00:00
|
|
|
#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:
|
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
|
|
|
|
2014-11-08 23:52:18 +00:00
|
|
|
void flush() override { ostr.next(); }
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|