ClickHouse/dbms/src/Storages/StorageFactory.h

35 lines
748 B
C++
Raw Normal View History

2011-10-31 17:30:44 +00:00
#pragma once
#include <Storages/IStorage.h>
2015-09-29 19:19:54 +00:00
#include <common/singleton.h>
2011-10-31 17:30:44 +00:00
namespace DB
{
2012-05-22 19:32:56 +00:00
class Context;
2011-10-31 17:30:44 +00:00
2017-04-16 15:00:33 +00:00
/** Allows you to create a table by the name of the engine.
2011-10-31 17:30:44 +00:00
*/
2015-02-09 09:51:08 +00:00
class StorageFactory : public Singleton<StorageFactory>
2011-10-31 17:30:44 +00:00
{
public:
StoragePtr get(
const String & name,
const String & data_path,
const String & table_name,
const String & database_name,
Context & local_context,
Context & context,
ASTPtr & query,
NamesAndTypesListPtr columns,
const NamesAndTypesList & materialized_columns,
const NamesAndTypesList & alias_columns,
const ColumnDefaults & column_defaults,
bool attach,
bool has_force_restore_data_flag) const;
2011-10-31 17:30:44 +00:00
};
}