mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 01:12:12 +00:00
70d1adfe4b
* save format string for NetException * format exceptions * format exceptions 2 * format exceptions 3 * format exceptions 4 * format exceptions 5 * format exceptions 6 * fix * format exceptions 7 * format exceptions 8 * Update MergeTreeIndexGin.cpp * Update AggregateFunctionMap.cpp * Update AggregateFunctionMap.cpp * fix
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#include <Interpreters/ExternalLoaderTempConfigRepository.h>
|
|
#include <Common/Exception.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
namespace ErrorCodes
|
|
{
|
|
extern const int BAD_ARGUMENTS;
|
|
}
|
|
|
|
|
|
ExternalLoaderTempConfigRepository::ExternalLoaderTempConfigRepository(const String & repository_name_, const String & path_, const LoadablesConfigurationPtr & config_)
|
|
: name(repository_name_), path(path_), config(config_) {}
|
|
|
|
|
|
std::set<String> ExternalLoaderTempConfigRepository::getAllLoadablesDefinitionNames()
|
|
{
|
|
std::set<String> paths;
|
|
paths.insert(path);
|
|
return paths;
|
|
}
|
|
|
|
|
|
bool ExternalLoaderTempConfigRepository::exists(const String & path_)
|
|
{
|
|
return path == path_;
|
|
}
|
|
|
|
|
|
Poco::Timestamp ExternalLoaderTempConfigRepository::getUpdateTime(const String & path_)
|
|
{
|
|
if (!exists(path_))
|
|
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Loadable {} not found", path_);
|
|
return creation_time;
|
|
}
|
|
|
|
|
|
LoadablesConfigurationPtr ExternalLoaderTempConfigRepository::load(const String & path_)
|
|
{
|
|
if (!exists(path_))
|
|
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Loadable {} not found", path_);
|
|
return config;
|
|
}
|
|
|
|
}
|