2011-10-31 17:30:44 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/Storages/IStorage.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
using Poco::SharedPtr;
|
2012-05-22 19:32:56 +00:00
|
|
|
class Context;
|
2011-10-31 17:30:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
/** Позволяет создать таблицу по имени движка.
|
|
|
|
*/
|
|
|
|
class StorageFactory
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
StoragePtr get(
|
|
|
|
const String & name,
|
|
|
|
const String & data_path,
|
|
|
|
const String & table_name,
|
2012-05-22 19:32:56 +00:00
|
|
|
Context & context,
|
|
|
|
ASTPtr & query,
|
2011-11-01 17:12:11 +00:00
|
|
|
NamesAndTypesListPtr columns) const;
|
2011-10-31 17:30:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef SharedPtr<StorageFactory> StorageFactoryPtr;
|
|
|
|
|
|
|
|
|
|
|
|
}
|