ClickHouse/programs/odbc-bridge/SchemaAllowedHandler.h

36 lines
736 B
C++
Raw Normal View History

#pragma once
2021-04-06 18:59:34 +00:00
#include <Interpreters/Context.h>
#include <Server/HTTP/HTTPRequestHandler.h>
#include <Poco/Logger.h>
#if USE_ODBC
2021-03-22 11:40:29 +00:00
namespace DB
{
class Context;
/// This handler establishes connection to database, and retrieves whether schema is allowed.
class SchemaAllowedHandler : public HTTPRequestHandler, WithContext
{
public:
SchemaAllowedHandler(size_t keep_alive_timeout_, ContextPtr context_)
: WithContext(context_)
, log(&Poco::Logger::get("SchemaAllowedHandler"))
2021-04-06 18:59:34 +00:00
, keep_alive_timeout(keep_alive_timeout_)
{
}
void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response) override;
private:
Poco::Logger * log;
size_t keep_alive_timeout;
};
}
#endif