ClickHouse/programs/odbc-bridge/IdentifierQuoteHandler.h

34 lines
721 B
C++
Raw Normal View History

2018-09-27 15:23:42 +00:00
#pragma once
2018-09-27 15:23:42 +00:00
#include <Interpreters/Context.h>
#include <Server/HTTP/HTTPRequestHandler.h>
2018-09-27 15:23:42 +00:00
#include <Poco/Logger.h>
#if USE_ODBC
/// This handler establishes connection to database, and retrieve quote style identifier
2018-09-27 15:23:42 +00:00
namespace DB
{
class IdentifierQuoteHandler : public HTTPRequestHandler, WithContext
2018-09-27 15:23:42 +00:00
{
public:
IdentifierQuoteHandler(size_t keep_alive_timeout_, ContextPtr context_)
: WithContext(context_)
, log(&Poco::Logger::get("IdentifierQuoteHandler"))
, keep_alive_timeout(keep_alive_timeout_)
2018-09-27 15:23:42 +00:00
{
}
void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response) override;
2018-09-27 15:23:42 +00:00
private:
Poco::Logger * log;
size_t keep_alive_timeout;
};
2018-09-27 15:23:42 +00:00
}
2018-09-27 15:23:42 +00:00
#endif