ClickHouse/dbms/include/DB/DataStreams/ValuesRowInputStream.h

34 lines
624 B
C
Raw Normal View History

2011-10-30 05:19:41 +00:00
#pragma once
#include <Poco/SharedPtr.h>
2011-11-06 05:01:42 +00:00
#include <DB/Core/Block.h>
2011-10-30 05:19:41 +00:00
#include <DB/IO/ReadBuffer.h>
#include <DB/DataStreams/IRowInputStream.h>
namespace DB
{
using Poco::SharedPtr;
/** Интерфейс потока для чтения данных в формате VALUES (как в INSERT запросе).
*/
class ValuesRowInputStream : public IRowInputStream
{
public:
2011-11-06 05:01:42 +00:00
ValuesRowInputStream(ReadBuffer & istr_, const Block & sample_);
2011-10-30 05:19:41 +00:00
Row read();
2011-11-06 05:01:42 +00:00
RowInputStreamPtr clone() { return new ValuesRowInputStream(istr, sample); }
2011-10-30 05:19:41 +00:00
private:
ReadBuffer & istr;
2011-11-06 05:01:42 +00:00
const Block & sample;
DataTypes data_types;
2011-10-30 05:19:41 +00:00
};
}