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:
|
2022-08-03 11:19:13 +00:00
|
|
|
ODBCBridgeHandlerFactory(const std::string & name_, size_t keep_alive_timeout_, 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:
|
|
|
|
Poco::Logger * log;
|
|
|
|
std::string name;
|
|
|
|
size_t keep_alive_timeout;
|
|
|
|
};
|
2021-03-07 13:55:40 +00:00
|
|
|
|
2018-08-08 16:15:29 +00:00
|
|
|
}
|