aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Common/NamePrompter.cpp
blob: 047e6f281456e77a4d6460c8d157ab92a6b695c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <IO/WriteHelpers.h>
#include <Common/NamePrompter.h>

namespace DB
{

String getHintsErrorMessageSuffix(const std::vector<String> & hints)
{
    if (hints.empty())
        return {};

    return ". Maybe you meant: " + toString(hints);
}

void appendHintsMessage(String & message, const std::vector<String> & hints)
{
    message += getHintsErrorMessageSuffix(hints);
}

}