aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Common/Config/ConfigHelper.h
blob: a1b630fa7265f9fb17664707b52b24e2e27c09dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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_ = false, bool empty_as = true);

}