ClickHouse/src/Interpreters/ExternalLoaderTempConfigRepository.h
Vitaly Baranov 4fe1c9a78f Get rid of checking the "last modification time" when the configuration is generated
to allow ExternalLoader::reloadConfig() work for generated configurations too.
2024-03-17 12:10:57 +01:00

30 lines
823 B
C++

#pragma once
#include <base/types.h>
#include <Interpreters/IExternalLoaderConfigRepository.h>
#include <Poco/Timestamp.h>
namespace DB
{
/// A config repository filled with preset loadables used by ExternalLoader.
class ExternalLoaderTempConfigRepository : public IExternalLoaderConfigRepository
{
public:
ExternalLoaderTempConfigRepository(const String & repository_name_, const String & path_, const LoadablesConfigurationPtr & config_);
String getName() const override { return name; }
bool isTemporary() const override { return true; }
std::set<String> getAllLoadablesDefinitionNames() override;
bool exists(const String & path) override;
LoadablesConfigurationPtr load(const String & path) override;
private:
String name;
String path;
LoadablesConfigurationPtr config;
};
}