ClickHouse/src/Common/Config/ConfigHelper.h
2022-01-17 22:36:27 +08:00

21 lines
446 B
C++

#pragma once
#include <string>
namespace Poco
{
namespace Util
{
class AbstractConfiguration;
}
}
namespace DB::ConfigHelper
{
/// The behavior is like `config.getBool(key, default_)`,
/// except when the tag is empty (aka. self-closing), `empty_as` will be used instead of throwing Poco::Exception.
bool getBool(const Poco::Util::AbstractConfiguration & config, const std::string & key, bool default_, bool empty_as);
}