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

34 lines
714 B
C++
Raw Normal View History

2011-10-30 05:19:41 +00:00
#pragma once
#include <DB/DataStreams/IRowInputStream.h>
namespace DB
{
class Block;
class Context;
class ReadBuffer;
2011-10-30 05:19:41 +00:00
/** Stream to read data in VALUES format (as in INSERT query).
2011-10-30 05:19:41 +00:00
*/
class ValuesRowInputStream : public IRowInputStream
{
public:
/** Data is parsed using fast, streaming parser.
* If interpret_expressions is true, it will, in addition, try to use SQL parser and interpreter
* in case when streaming parser could not parse field (this is very slow).
*/
ValuesRowInputStream(ReadBuffer & istr_, const Context & context_, bool interpret_expressions_);
2011-10-30 05:19:41 +00:00
bool read(Block & block) override;
2011-10-30 05:19:41 +00:00
private:
ReadBuffer & istr;
const Context & context;
bool interpret_expressions;
2011-10-30 05:19:41 +00:00
};
}