ClickHouse/dbms/include/DB/Interpreters/InterpreterShowTablesQuery.h
2012-06-18 07:49:19 +00:00

32 lines
663 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <DB/DataStreams/BlockIO.h>
#include <DB/Interpreters/Context.h>
namespace DB
{
/** Вывести список имён таблиц/баз данных по некоторым условиям.
* Интерпретирует запрос путём замены его на запрос SELECT из таблицы system.tables или system.databases.
*/
class InterpreterShowTablesQuery
{
public:
InterpreterShowTablesQuery(ASTPtr query_ptr_, Context & context_);
BlockIO execute();
BlockInputStreamPtr executeAndFormat(WriteBuffer & buf);
private:
ASTPtr query_ptr;
Context context;
String getRewrittenQuery();
};
}