mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-19 15:01:03 +00:00
29 lines
627 B
C++
29 lines
627 B
C++
#pragma once
|
||
|
||
#include <DB/Storages/IStorage.h>
|
||
#include <DB/Interpreters/Context.h>
|
||
|
||
|
||
namespace DB
|
||
{
|
||
|
||
|
||
/** Позволяет создать новую таблицу или создать объект уже существующей таблицы.
|
||
*/
|
||
class InterpreterCreateQuery
|
||
{
|
||
public:
|
||
InterpreterCreateQuery(ASTPtr query_ptr_, Context & context_, size_t max_block_size_ = DEFAULT_BLOCK_SIZE);
|
||
|
||
/// Добавляет созданную таблицу в контекст, а также возвращает её.
|
||
StoragePtr execute();
|
||
|
||
private:
|
||
ASTPtr query_ptr;
|
||
Context context;
|
||
size_t max_block_size;
|
||
};
|
||
|
||
|
||
}
|