ClickHouse/dbms/Databases/DatabaseOrdinary.h
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

36 lines
851 B
C++

#pragma once
#include <Databases/DatabaseWithDictionaries.h>
#include <Common/ThreadPool.h>
namespace DB
{
/** Default engine of databases.
* It stores tables list in filesystem using list of .sql files,
* that contain declaration of table represented by SQL ATTACH TABLE query.
*/
class DatabaseOrdinary final : public DatabaseWithDictionaries
{
public:
DatabaseOrdinary(const String & name_, const String & metadata_path_, const Context & context);
String getEngineName() const override { return "Ordinary"; }
void loadStoredObjects(
Context & context,
bool has_force_restore_data_flag) override;
void alterTable(
const Context & context,
const String & name,
const StorageInMemoryMetadata & metadata) override;
private:
void startupTables(ThreadPool & thread_pool);
};
}