ClickHouse/src/Client/ConnectionParameters.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
839 B
C++
Raw Normal View History

2018-08-25 13:55:18 +00:00
#pragma once
#include <string>
2018-08-25 13:55:18 +00:00
#include <Core/Protocol.h>
#include <IO/ConnectionTimeouts.h>
namespace Poco::Util
2018-08-25 13:55:18 +00:00
{
class AbstractConfiguration;
2018-08-25 13:55:18 +00:00
}
namespace DB
{
2018-08-25 13:55:18 +00:00
struct ConnectionParameters
{
std::string host;
2019-01-19 23:27:52 +00:00
UInt16 port{};
std::string default_database;
std::string user;
std::string password;
2022-08-03 19:44:08 +00:00
std::string quota_key;
2019-01-19 23:27:52 +00:00
Protocol::Secure security = Protocol::Secure::Disable;
Protocol::Compression compression = Protocol::Compression::Enable;
2018-08-25 13:55:18 +00:00
ConnectionTimeouts timeouts;
ConnectionParameters() = default;
ConnectionParameters(const Poco::Util::AbstractConfiguration & config);
2022-03-10 19:41:03 +00:00
ConnectionParameters(const Poco::Util::AbstractConfiguration & config, std::string host, std::optional<UInt16> port);
2022-03-10 19:41:03 +00:00
static UInt16 getPortFromConfig(const Poco::Util::AbstractConfiguration & config);
2018-08-25 13:55:18 +00:00
};
}