mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 14:11:58 +00:00
01c39dcf1c
* fix segfault on ATTACH MATERIALIZED VIEW * allow only TEMPORARY TABLEs (not databases or views) * forbid choosing ENGINE for TEMPORARY tables * fix segfault on CREATE TABLE t1 AS t2 where t2 is a View
36 lines
912 B
C++
36 lines
912 B
C++
#pragma once
|
|
|
|
#include <Storages/IStorage.h>
|
|
#include <ext/singleton.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class Context;
|
|
|
|
|
|
/** Allows you to create a table by the name and parameters of the engine.
|
|
* In 'columns', 'materialized_columns', etc., Nested data structures must be flattened.
|
|
* You should subsequently call IStorage::startup method to work with table.
|
|
*/
|
|
class StorageFactory : public ext::singleton<StorageFactory>
|
|
{
|
|
public:
|
|
StoragePtr get(
|
|
ASTCreateQuery & query,
|
|
const String & data_path,
|
|
const String & table_name,
|
|
const String & database_name,
|
|
Context & local_context,
|
|
Context & context,
|
|
NamesAndTypesListPtr columns,
|
|
const NamesAndTypesList & materialized_columns,
|
|
const NamesAndTypesList & alias_columns,
|
|
const ColumnDefaults & column_defaults,
|
|
bool attach,
|
|
bool has_force_restore_data_flag) const;
|
|
};
|
|
|
|
}
|