mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
85d783c247
* Remove config_common.h * Refactor libcpuid contrib * Remove support for libcpuinfo * Define USE_CPUID in Arcadia * Refactor Poco libraries
36 lines
932 B
C++
36 lines
932 B
C++
#pragma once
|
|
|
|
#if USE_ODBC
|
|
|
|
# include <Interpreters/Context.h>
|
|
# include <Poco/Logger.h>
|
|
# include <Poco/Net/HTTPRequestHandler.h>
|
|
# include <Common/config.h>
|
|
|
|
/** The structure of the table is taken from the query "SELECT * FROM table WHERE 1=0".
|
|
* TODO: It would be much better to utilize ODBC methods dedicated for columns description.
|
|
* If there is no such table, an exception is thrown.
|
|
*/
|
|
namespace DB
|
|
{
|
|
|
|
class ODBCColumnsInfoHandler : public Poco::Net::HTTPRequestHandler
|
|
{
|
|
public:
|
|
ODBCColumnsInfoHandler(size_t keep_alive_timeout_, Context & context_)
|
|
: log(&Poco::Logger::get("ODBCColumnsInfoHandler")), keep_alive_timeout(keep_alive_timeout_), context(context_)
|
|
{
|
|
}
|
|
|
|
void handleRequest(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response) override;
|
|
|
|
private:
|
|
Poco::Logger * log;
|
|
size_t keep_alive_timeout;
|
|
Context & context;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|