mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
4733504b51
if ODBC driver doesn't support schema.
32 lines
666 B
C++
32 lines
666 B
C++
#pragma once
|
|
|
|
#include <Poco/Logger.h>
|
|
#include <Poco/Net/HTTPRequestHandler.h>
|
|
|
|
#if USE_ODBC
|
|
|
|
namespace DB
|
|
{
|
|
class Context;
|
|
|
|
|
|
/// This handler establishes connection to database, and retrieve whether schema is allowed.
|
|
class SchemaAllowedHandler : public Poco::Net::HTTPRequestHandler
|
|
{
|
|
public:
|
|
SchemaAllowedHandler(size_t keep_alive_timeout_, Context &)
|
|
: log(&Poco::Logger::get("SchemaAllowedHandler")), keep_alive_timeout(keep_alive_timeout_)
|
|
{
|
|
}
|
|
|
|
void handleRequest(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response) override;
|
|
|
|
private:
|
|
Poco::Logger * log;
|
|
size_t keep_alive_timeout;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|