mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 03:12:43 +00:00
78fc36ca49
This makes the target location consistent with other auto-generated files like config_formats.h, config_core.h, and config_functions.h and simplifies the build of clickhouse_common.
34 lines
760 B
C++
34 lines
760 B
C++
#pragma once
|
|
|
|
#include <atomic>
|
|
#include <memory>
|
|
#include <Server/IServer.h>
|
|
#include <Server/TCPServerConnectionFactory.h>
|
|
#include <Core/PostgreSQLProtocol.h>
|
|
#include "config.h"
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class PostgreSQLHandlerFactory : public TCPServerConnectionFactory
|
|
{
|
|
private:
|
|
IServer & server;
|
|
Poco::Logger * log;
|
|
|
|
#if USE_SSL
|
|
bool ssl_enabled = true;
|
|
#else
|
|
bool ssl_enabled = false;
|
|
#endif
|
|
|
|
std::atomic<Int32> last_connection_id = 0;
|
|
std::vector<std::shared_ptr<PostgreSQLProtocol::PGAuthentication::AuthenticationMethod>> auth_methods;
|
|
|
|
public:
|
|
explicit PostgreSQLHandlerFactory(IServer & server_);
|
|
|
|
Poco::Net::TCPServerConnection * createConnection(const Poco::Net::StreamSocket & socket, TCPServer & server) override;
|
|
};
|
|
}
|