1 | #pragma once |
---|---|
2 | |
3 | #include <Core/Types.h> |
4 | #include <Interpreters/IExternalLoaderConfigRepository.h> |
5 | #include <Poco/Timestamp.h> |
6 | |
7 | |
8 | namespace DB |
9 | { |
10 | /// A config repository filled with preset loadables used by ExternalLoader. |
11 | class ExternalLoaderTempConfigRepository : public IExternalLoaderConfigRepository |
12 | { |
13 | public: |
14 | ExternalLoaderTempConfigRepository(const String & repository_name_, const String & path_, const LoadablesConfigurationPtr & config_); |
15 | |
16 | const String & getName() const override { return name; } |
17 | bool isTemporary() const override { return true; } |
18 | |
19 | std::set<String> getAllLoadablesDefinitionNames() override; |
20 | bool exists(const String & path) override; |
21 | Poco::Timestamp getUpdateTime(const String & path) override; |
22 | LoadablesConfigurationPtr load(const String & path) override; |
23 | |
24 | private: |
25 | String name; |
26 | String path; |
27 | LoadablesConfigurationPtr config; |
28 | Poco::Timestamp creation_time; |
29 | }; |
30 | |
31 | } |
32 |