ClickHouse/src/Interpreters/ExternalLoaderDictionaryStorageConfigRepository.cpp
2021-04-26 13:52:41 +03:00

40 lines
1.1 KiB
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;
}
Poco::Timestamp ExternalLoaderDictionaryStorageConfigRepository::getUpdateTime(const std::string &)
{
return dictionary_storage.getUpdateTime();
}
LoadablesConfigurationPtr ExternalLoaderDictionaryStorageConfigRepository::load(const std::string &)
{
return dictionary_storage.getConfiguration();
}
}