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>
|
|
|
|
#include <Poco/Logger.h>
|
|
|
|
#include <Poco/Net/HTTPRequestHandler.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
|
|
|
|
2018-09-27 15:23:42 +00:00
|
|
|
class IdentifierQuoteHandler : public Poco::Net::HTTPRequestHandler
|
|
|
|
{
|
|
|
|
public:
|
2020-04-17 20:53:25 +00:00
|
|
|
IdentifierQuoteHandler(size_t keep_alive_timeout_, Context &)
|
|
|
|
: log(&Poco::Logger::get("IdentifierQuoteHandler")), keep_alive_timeout(keep_alive_timeout_)
|
2018-09-27 15:23:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void handleRequest(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Poco::Logger * log;
|
|
|
|
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
|