2011-10-30 05:19:41 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/DataStreams/IRowOutputStream.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2016-08-13 01:57:35 +00:00
|
|
|
class WriteBuffer;
|
|
|
|
|
2011-10-30 05:19:41 +00:00
|
|
|
|
2012-11-10 04:43:04 +00:00
|
|
|
/** Поток для вывода данных в формате VALUES (как в INSERT запросе).
|
2011-10-30 05:19:41 +00:00
|
|
|
*/
|
|
|
|
class ValuesRowOutputStream : public IRowOutputStream
|
|
|
|
{
|
|
|
|
public:
|
2016-02-16 16:39:39 +00:00
|
|
|
ValuesRowOutputStream(WriteBuffer & ostr_);
|
2011-10-30 05:19:41 +00:00
|
|
|
|
2016-02-16 16:39:39 +00:00
|
|
|
void writeField(const IColumn & column, const IDataType & type, size_t row_num) override;
|
2014-11-08 23:52:18 +00:00
|
|
|
void writeFieldDelimiter() override;
|
|
|
|
void writeRowStartDelimiter() override;
|
|
|
|
void writeRowEndDelimiter() override;
|
|
|
|
void writeRowBetweenDelimiter() override;
|
2016-08-13 01:57:35 +00:00
|
|
|
void flush() override;
|
2014-08-14 20:27:41 +00:00
|
|
|
|
2011-10-30 05:19:41 +00:00
|
|
|
private:
|
|
|
|
WriteBuffer & ostr;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|