2018-08-08 16:15:29 +00:00
|
|
|
#pragma once
|
2021-02-19 12:51:26 +00:00
|
|
|
|
2021-04-10 23:33:54 +00:00
|
|
|
#include <Interpreters/Context_fwd.h>
|
2021-02-19 12:51:26 +00:00
|
|
|
#include <Server/HTTP/HTTPRequestHandlerFactory.h>
|
2018-08-19 17:09:54 +00:00
|
|
|
#include "ColumnInfoHandler.h"
|
2018-09-27 15:23:42 +00:00
|
|
|
#include "IdentifierQuoteHandler.h"
|
2021-02-19 12:51:26 +00:00
|
|
|
#include "MainHandler.h"
|
2020-07-06 12:23:36 +00:00
|
|
|
#include "SchemaAllowedHandler.h"
|
2021-02-19 12:51:26 +00:00
|
|
|
#include <Poco/Logger.h>
|
|
|
|
|
2018-08-08 16:15:29 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2020-07-06 12:23:36 +00:00
|
|
|
/** Factory for '/ping', '/', '/columns_info', '/identifier_quote', '/schema_allowed' handlers.
|
2018-08-10 14:46:12 +00:00
|
|
|
* Also stores Session pools for ODBC connections
|
|
|
|
*/
|
2021-04-10 23:33:54 +00:00
|
|
|
class ODBCBridgeHandlerFactory : public HTTPRequestHandlerFactory, WithContext
|
2018-08-08 16:15:29 +00:00
|
|
|
{
|
|
|
|
public:
|
2024-03-22 20:24:53 +00:00
|
|
|
ODBCBridgeHandlerFactory(const std::string & name_, ContextPtr context_);
|
2018-08-08 16:15:29 +00:00
|
|
|
|
2021-02-19 12:51:26 +00:00
|
|
|
std::unique_ptr<HTTPRequestHandler> createRequestHandler(const HTTPServerRequest & request) override;
|
2018-08-08 16:15:29 +00:00
|
|
|
|
|
|
|
private:
|
2024-01-23 17:04:50 +00:00
|
|
|
LoggerPtr log;
|
2018-08-08 16:15:29 +00:00
|
|
|
std::string name;
|
|
|
|
};
|
2021-03-07 13:55:40 +00:00
|
|
|
|
2018-08-08 16:15:29 +00:00
|
|
|
}
|