1#pragma once
2
3#include <Core/Types.h>
4
5namespace Poco::Util
6{
7 class AbstractConfiguration;
8}
9
10namespace DB
11{
12 /// Returns true if two configurations contains the same keys and values.
13 bool isSameConfiguration(const Poco::Util::AbstractConfiguration & left,
14 const Poco::Util::AbstractConfiguration & right);
15
16 /// Returns true if specified subviews of the two configurations contains the same keys and values.
17 bool isSameConfiguration(const Poco::Util::AbstractConfiguration & left, const String & left_key,
18 const Poco::Util::AbstractConfiguration & right, const String & right_key);
19
20 inline bool operator==(const Poco::Util::AbstractConfiguration & left, const Poco::Util::AbstractConfiguration & right)
21 {
22 return isSameConfiguration(left, right);
23 }
24
25 inline bool operator!=(const Poco::Util::AbstractConfiguration & left, const Poco::Util::AbstractConfiguration & right)
26 {
27 return !isSameConfiguration(left, right);
28 }
29}
30