2012-08-17 19:53:11 +00:00
|
|
|
#pragma once
|
|
|
|
|
2018-06-10 19:22:49 +00:00
|
|
|
#include <Formats/FormatSettings.h>
|
|
|
|
#include <Formats/TabSeparatedRowOutputStream.h>
|
2012-08-17 19:53:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-05-13 22:19:04 +00:00
|
|
|
/** A stream for outputting data in tsv format, but without escaping individual values.
|
|
|
|
* (That is, the output is irreversible.)
|
2012-08-17 19:53:11 +00:00
|
|
|
*/
|
|
|
|
class TabSeparatedRawRowOutputStream : public TabSeparatedRowOutputStream
|
|
|
|
{
|
|
|
|
public:
|
2018-06-08 01:51:55 +00:00
|
|
|
TabSeparatedRawRowOutputStream(WriteBuffer & ostr_, const Block & sample_, bool with_names_, bool with_types_, const FormatSettings & format_settings)
|
|
|
|
: TabSeparatedRowOutputStream(ostr_, sample_, with_names_, with_types_, format_settings) {}
|
2012-08-17 19:53:11 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
void writeField(const IColumn & column, const IDataType & type, size_t row_num) override
|
|
|
|
{
|
2018-06-08 01:51:55 +00:00
|
|
|
type.serializeText(column, row_num, ostr, format_settings);
|
2017-04-01 07:20:54 +00:00
|
|
|
}
|
2012-08-17 19:53:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|