mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-11 18:14:03 +00:00
35 lines
643 B
C++
35 lines
643 B
C++
#pragma once
|
|
|
|
#include <Poco/SharedPtr.h>
|
|
|
|
#include <DB/IO/WriteBuffer.h>
|
|
#include <DB/DataTypes/IDataType.h>
|
|
#include <DB/DataStreams/IRowOutputStream.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
using Poco::SharedPtr;
|
|
|
|
|
|
/** Интерфейс потока для вывода данных в формате tsv.
|
|
*/
|
|
class TabSeparatedRowOutputStream : public IRowOutputStream
|
|
{
|
|
public:
|
|
TabSeparatedRowOutputStream(WriteBuffer & ostr_, SharedPtr<DataTypes> data_types_);
|
|
|
|
void writeField(const Field & field);
|
|
void writeFieldDelimiter();
|
|
void writeRowEndDelimiter();
|
|
|
|
private:
|
|
WriteBuffer & ostr;
|
|
SharedPtr<DataTypes> data_types;
|
|
size_t field_number;
|
|
};
|
|
|
|
}
|
|
|