2011-10-31 17:30:44 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/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
|
|
|
|
|
|
|
|
|
|
|
/** Позволяет создать таблицу по имени движка.
|
|
|
|
*/
|
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,
|
2013-02-07 13:03:19 +00:00
|
|
|
const String & database_name,
|
2014-09-23 15:28:21 +00:00
|
|
|
Context & local_context,
|
2012-05-22 19:32:56 +00:00
|
|
|
Context & context,
|
|
|
|
ASTPtr & query,
|
2013-01-17 20:21:03 +00:00
|
|
|
NamesAndTypesListPtr columns,
|
2014-10-03 15:30:10 +00:00
|
|
|
const NamesAndTypesList & materialized_columns,
|
2014-09-30 03:08:47 +00:00
|
|
|
const NamesAndTypesList & alias_columns,
|
|
|
|
const ColumnDefaults & column_defaults,
|
2016-08-09 21:48:05 +00:00
|
|
|
bool attach,
|
|
|
|
bool has_force_restore_data_flag) const;
|
2011-10-31 17:30:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|