2018-09-27 15:23:42 +00:00
|
|
|
#pragma once
|
2020-05-08 14:11:19 +00:00
|
|
|
|
2018-09-27 15:23:42 +00:00
|
|
|
#include <Interpreters/Context.h>
|
2021-02-19 12:51:26 +00:00
|
|
|
#include <Server/HTTP/HTTPRequestHandler.h>
|
2022-09-28 08:45:15 +00:00
|
|
|
#include "config.h"
|
2018-09-27 15:23:42 +00:00
|
|
|
#include <Poco/Logger.h>
|
|
|
|
|
2020-05-08 14:11:19 +00:00
|
|
|
#if USE_ODBC
|
|
|
|
|
|
|
|
/// This handler establishes connection to database, and retrieve quote style identifier
|
2018-09-27 15:23:42 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
2020-05-08 14:11:19 +00:00
|
|
|
|
2021-04-11 06:13:11 +00:00
|
|
|
class IdentifierQuoteHandler : public HTTPRequestHandler, WithContext
|
2018-09-27 15:23:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-04-11 06:13:11 +00:00
|
|
|
IdentifierQuoteHandler(size_t keep_alive_timeout_, ContextPtr context_)
|
|
|
|
: WithContext(context_)
|
2024-01-23 17:04:50 +00:00
|
|
|
, log(getLogger("IdentifierQuoteHandler"))
|
2021-04-11 06:13:11 +00:00
|
|
|
, keep_alive_timeout(keep_alive_timeout_)
|
2018-09-27 15:23:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-01-03 16:47:15 +00:00
|
|
|
void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response, const ProfileEvents::Event & write_event) override;
|
2018-09-27 15:23:42 +00:00
|
|
|
|
|
|
|
private:
|
2024-01-23 17:04:50 +00:00
|
|
|
LoggerPtr log;
|
2018-09-27 15:23:42 +00:00
|
|
|
size_t keep_alive_timeout;
|
|
|
|
};
|
2020-05-08 14:11:19 +00:00
|
|
|
|
2018-09-27 15:23:42 +00:00
|
|
|
}
|
2020-05-08 14:11:19 +00:00
|
|
|
|
2018-09-27 15:23:42 +00:00
|
|
|
#endif
|