ClickHouse/dbms/src/Interpreters/InterpreterShowCreateQuery.h

31 lines
651 B
C++
Raw Normal View History

#pragma once
#include <Interpreters/Context.h>
#include <Interpreters/IInterpreter.h>
namespace DB
{
/** Вернуть одну строку с одним столбцом statement типа String с текстом запроса, создающего указанную таблицу.
*/
2015-06-18 02:11:05 +00:00
class InterpreterShowCreateQuery : public IInterpreter
{
public:
InterpreterShowCreateQuery(ASTPtr query_ptr_, Context & context_)
: query_ptr(query_ptr_), context(context_) {}
BlockIO execute() override;
private:
ASTPtr query_ptr;
Context context;
Block getSampleBlock();
BlockInputStreamPtr executeImpl();
};
}