ClickHouse/src/Interpreters/ExternalLoaderDictionaryStorageConfigRepository.cpp
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

35 lines
959 B
C++

#include "ExternalLoaderDictionaryStorageConfigRepository.h"
#include <Interpreters/Context.h>
#include <Storages/StorageDictionary.h>
namespace DB
{
ExternalLoaderDictionaryStorageConfigRepository::ExternalLoaderDictionaryStorageConfigRepository(const StorageDictionary & dictionary_storage_)
: dictionary_storage(dictionary_storage_)
{
}
std::string ExternalLoaderDictionaryStorageConfigRepository::getName() const
{
return dictionary_storage.getStorageID().getInternalDictionaryName();
}
std::set<std::string> ExternalLoaderDictionaryStorageConfigRepository::getAllLoadablesDefinitionNames()
{
return { getName() };
}
bool ExternalLoaderDictionaryStorageConfigRepository::exists(const std::string & loadable_definition_name)
{
return getName() == loadable_definition_name;
}
LoadablesConfigurationPtr ExternalLoaderDictionaryStorageConfigRepository::load(const std::string &)
{
return dictionary_storage.getConfiguration();
}
}