1 | #pragma once |
---|---|
2 | #include <Interpreters/Context.h> |
3 | #include <Poco/Logger.h> |
4 | #include <Poco/Net/HTTPRequestHandler.h> |
5 | #include <Common/config.h> |
6 | |
7 | #if USE_POCO_SQLODBC || USE_POCO_DATAODBC |
8 | /** This handler establish connection to database, and retrieve quote style identifier |
9 | */ |
10 | namespace DB |
11 | { |
12 | class IdentifierQuoteHandler : public Poco::Net::HTTPRequestHandler |
13 | { |
14 | public: |
15 | IdentifierQuoteHandler(size_t keep_alive_timeout_, std::shared_ptr<Context> context_) |
16 | : log(&Poco::Logger::get("IdentifierQuoteHandler")), keep_alive_timeout(keep_alive_timeout_), context(context_) |
17 | { |
18 | } |
19 | |
20 | void handleRequest(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response) override; |
21 | |
22 | private: |
23 | Poco::Logger * log; |
24 | size_t keep_alive_timeout; |
25 | std::shared_ptr<Context> context; |
26 | }; |
27 | } |
28 | #endif |
29 |