2012-11-10 04:43:53 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Poco/SharedPtr.h>
|
|
|
|
|
|
|
|
#include <DB/Core/Block.h>
|
|
|
|
#include <DB/IO/ReadBuffer.h>
|
|
|
|
#include <DB/DataStreams/IRowInputStream.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
/** Поток для ввода данных в бинарном построчном формате.
|
|
|
|
*/
|
|
|
|
class BinaryRowInputStream : public IRowInputStream
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BinaryRowInputStream(ReadBuffer & istr_, const Block & sample_);
|
|
|
|
|
2013-01-07 00:57:43 +00:00
|
|
|
bool read(Row & row);
|
2012-11-10 04:43:53 +00:00
|
|
|
|
|
|
|
RowInputStreamPtr clone() { return new BinaryRowInputStream(istr, sample); }
|
|
|
|
|
|
|
|
private:
|
|
|
|
ReadBuffer & istr;
|
|
|
|
const Block sample;
|
|
|
|
DataTypes data_types;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|