mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 05:03:20 +00:00
78fc36ca49
This makes the target location consistent with other auto-generated files like config_formats.h, config_core.h, and config_functions.h and simplifies the build of clickhouse_common.
37 lines
756 B
C++
37 lines
756 B
C++
#pragma once
|
|
|
|
#include <Interpreters/Context.h>
|
|
#include <Server/HTTP/HTTPRequestHandler.h>
|
|
#include "config.h"
|
|
#include <Poco/Logger.h>
|
|
|
|
#if USE_ODBC
|
|
|
|
|
|
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"))
|
|
, keep_alive_timeout(keep_alive_timeout_)
|
|
{
|
|
}
|
|
|
|
void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response) override;
|
|
|
|
private:
|
|
Poco::Logger * log;
|
|
size_t keep_alive_timeout;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|