mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-02 06:30:55 +00:00
670e98fa92
* allow several <graphite> targets * fix * fix * Adjustable parts * changelog version * fix * changelog * Style fixes * attachSystemTables * config describe * fixes * fixes
22 lines
610 B
C++
22 lines
610 B
C++
#include <DB/Common/getMultipleKeysFromConfig.h>
|
|
|
|
#include <Poco/Util/AbstractConfiguration.h>
|
|
#include <DB/Common/StringUtils.h>
|
|
|
|
namespace DB
|
|
{
|
|
std::vector<std::string> getMultipleKeysFromConfig(Poco::Util::AbstractConfiguration & config, const std::string & root, const std::string & name)
|
|
{
|
|
std::vector<std::string> values;
|
|
Poco::Util::AbstractConfiguration::Keys config_keys;
|
|
config.keys(root, config_keys);
|
|
for (const auto & key : config_keys)
|
|
{
|
|
if (key != name && !(startsWith(key.data(), name + "[") && endsWith(key.data(), "]")))
|
|
continue;
|
|
values.emplace_back(key);
|
|
}
|
|
return values;
|
|
}
|
|
}
|