ClickHouse/src/Interpreters/ExternalLoaderDictionaryStorageConfigRepository.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
959 B
C++
Raw Normal View History

2021-04-21 13:45:13 +00:00
#include "ExternalLoaderDictionaryStorageConfigRepository.h"
#include <Interpreters/Context.h>
#include <Storages/StorageDictionary.h>
namespace DB
{
2021-04-22 07:53:44 +00:00
ExternalLoaderDictionaryStorageConfigRepository::ExternalLoaderDictionaryStorageConfigRepository(const StorageDictionary & dictionary_storage_)
: dictionary_storage(dictionary_storage_)
2021-04-21 13:45:13 +00:00
{
}
2021-04-22 07:53:44 +00:00
std::string ExternalLoaderDictionaryStorageConfigRepository::getName() const
2021-04-21 13:45:13 +00:00
{
2021-04-22 07:53:44 +00:00
return dictionary_storage.getStorageID().getInternalDictionaryName();
2021-04-21 13:45:13 +00:00
}
std::set<std::string> ExternalLoaderDictionaryStorageConfigRepository::getAllLoadablesDefinitionNames()
{
2021-04-22 07:53:44 +00:00
return { getName() };
2021-04-21 13:45:13 +00:00
}
bool ExternalLoaderDictionaryStorageConfigRepository::exists(const std::string & loadable_definition_name)
{
2021-04-22 07:53:44 +00:00
return getName() == loadable_definition_name;
2021-04-21 13:45:13 +00:00
}
LoadablesConfigurationPtr ExternalLoaderDictionaryStorageConfigRepository::load(const std::string &)
{
2021-04-22 07:53:44 +00:00
return dictionary_storage.getConfiguration();
2021-04-21 13:45:13 +00:00
}
}