mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
31 lines
659 B
C++
31 lines
659 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:
|
|
explicit SchemaAllowedHandler(ContextPtr context_) : WithContext(context_), log(getLogger("SchemaAllowedHandler")) { }
|
|
|
|
void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response, const ProfileEvents::Event & write_event) override;
|
|
|
|
private:
|
|
LoggerPtr log;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|