1 | #pragma once |
2 | |
3 | #include <Databases/DatabaseWithDictionaries.h> |
4 | #include <Common/ThreadPool.h> |
5 | |
6 | |
7 | namespace DB |
8 | { |
9 | |
10 | /** Default engine of databases. |
11 | * It stores tables list in filesystem using list of .sql files, |
12 | * that contain declaration of table represented by SQL ATTACH TABLE query. |
13 | */ |
14 | class DatabaseOrdinary : public DatabaseWithDictionaries //DatabaseWithOwnTablesBase |
15 | { |
16 | public: |
17 | DatabaseOrdinary(const String & name_, const String & metadata_path_, const Context & context); |
18 | |
19 | String getEngineName() const override { return "Ordinary" ; } |
20 | |
21 | void loadStoredObjects( |
22 | Context & context, |
23 | bool has_force_restore_data_flag) override; |
24 | |
25 | void alterTable( |
26 | const Context & context, |
27 | const String & name, |
28 | const StorageInMemoryMetadata & metadata) override; |
29 | |
30 | private: |
31 | |
32 | void startupTables(ThreadPool & thread_pool); |
33 | }; |
34 | |
35 | } |
36 | |