diff options
| author | vitalyisaev <[email protected]> | 2023-11-14 09:58:56 +0300 |
|---|---|---|
| committer | vitalyisaev <[email protected]> | 2023-11-14 10:20:20 +0300 |
| commit | c2b2dfd9827a400a8495e172a56343462e3ceb82 (patch) | |
| tree | cd4e4f597d01bede4c82dffeb2d780d0a9046bd0 /contrib/clickhouse/src/Interpreters/ExternalLoaderDictionaryStorageConfigRepository.cpp | |
| parent | d4ae8f119e67808cb0cf776ba6e0cf95296f2df7 (diff) | |
YQ Connector: move tests from yql to ydb (OSS)
Перенос папки с тестами на Коннектор из папки yql в папку ydb (синхронизируется с github).
Diffstat (limited to 'contrib/clickhouse/src/Interpreters/ExternalLoaderDictionaryStorageConfigRepository.cpp')
| -rw-r--r-- | contrib/clickhouse/src/Interpreters/ExternalLoaderDictionaryStorageConfigRepository.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/contrib/clickhouse/src/Interpreters/ExternalLoaderDictionaryStorageConfigRepository.cpp b/contrib/clickhouse/src/Interpreters/ExternalLoaderDictionaryStorageConfigRepository.cpp new file mode 100644 index 00000000000..86f5a9ded0a --- /dev/null +++ b/contrib/clickhouse/src/Interpreters/ExternalLoaderDictionaryStorageConfigRepository.cpp @@ -0,0 +1,39 @@ +#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(); +} + +} |
