mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Removed static std::string variable #2482
This commit is contained in:
parent
0415c9e34a
commit
9a78ee3e44
@ -6,10 +6,12 @@
|
|||||||
#include <IO/ReadWriteBufferFromHTTP.h>
|
#include <IO/ReadWriteBufferFromHTTP.h>
|
||||||
#include <Poco/Path.h>
|
#include <Poco/Path.h>
|
||||||
#include <Poco/Util/AbstractConfiguration.h>
|
#include <Poco/Util/AbstractConfiguration.h>
|
||||||
|
#include <Poco/Net/HTTPRequest.h>
|
||||||
#include <Common/ShellCommand.h>
|
#include <Common/ShellCommand.h>
|
||||||
#include <common/logger_useful.h>
|
#include <common/logger_useful.h>
|
||||||
#include <ext/range.h>
|
#include <ext/range.h>
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
namespace ErrorCodes
|
namespace ErrorCodes
|
||||||
@ -73,7 +75,7 @@ bool ODBCBridgeHelper::checkODBCBridgeIsRunning() const
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ReadWriteBufferFromHTTP buf(ping_url, ODBCBridgeHelper::PING_METHOD, nullptr);
|
ReadWriteBufferFromHTTP buf(ping_url, Poco::Net::HTTPRequest::HTTP_GET, nullptr);
|
||||||
return checkString(ODBCBridgeHelper::PING_OK_ANSWER, buf);
|
return checkString(ODBCBridgeHelper::PING_OK_ANSWER, buf);
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <Interpreters/Context.h>
|
#include <Interpreters/Context.h>
|
||||||
#include <Poco/Logger.h>
|
#include <Poco/Logger.h>
|
||||||
#include <Poco/Net/HTTPRequest.h>
|
|
||||||
#include <Poco/URI.h>
|
#include <Poco/URI.h>
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
@ -33,9 +32,6 @@ public:
|
|||||||
static constexpr inline auto MAIN_HANDLER = "/";
|
static constexpr inline auto MAIN_HANDLER = "/";
|
||||||
static constexpr inline auto PING_OK_ANSWER = "Ok.";
|
static constexpr inline auto PING_OK_ANSWER = "Ok.";
|
||||||
|
|
||||||
static const inline std::string PING_METHOD = Poco::Net::HTTPRequest::HTTP_GET;
|
|
||||||
static const inline std::string MAIN_METHOD = Poco::Net::HTTPRequest::HTTP_POST;
|
|
||||||
|
|
||||||
ODBCBridgeHelper(const Context & context_global_, const std::string & connection_string_);
|
ODBCBridgeHelper(const Context & context_global_, const std::string & connection_string_);
|
||||||
|
|
||||||
std::vector<std::pair<std::string, std::string>> getURLParams(const NamesAndTypesList & cols, size_t max_block_size) const;
|
std::vector<std::pair<std::string, std::string>> getURLParams(const NamesAndTypesList & cols, size_t max_block_size) const;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <common/LocalDateTime.h>
|
#include <common/LocalDateTime.h>
|
||||||
#include <Poco/Ext/SessionPoolHelpers.h>
|
#include <Poco/Ext/SessionPoolHelpers.h>
|
||||||
#include <Poco/Util/AbstractConfiguration.h>
|
#include <Poco/Util/AbstractConfiguration.h>
|
||||||
|
#include <Poco/Net/HTTPRequest.h>
|
||||||
#include <DataTypes/DataTypeString.h>
|
#include <DataTypes/DataTypeString.h>
|
||||||
#include <Columns/ColumnString.h>
|
#include <Columns/ColumnString.h>
|
||||||
#include <DataStreams/IProfilingBlockInputStream.h>
|
#include <DataStreams/IProfilingBlockInputStream.h>
|
||||||
@ -28,7 +29,7 @@ namespace
|
|||||||
size_t max_block_size,
|
size_t max_block_size,
|
||||||
const ConnectionTimeouts & timeouts)
|
const ConnectionTimeouts & timeouts)
|
||||||
{
|
{
|
||||||
read_buf = std::make_unique<ReadWriteBufferFromHTTP>(uri, ODBCBridgeHelper::MAIN_METHOD, callback, timeouts);
|
read_buf = std::make_unique<ReadWriteBufferFromHTTP>(uri, Poco::Net::HTTPRequest::HTTP_POST, callback, timeouts);
|
||||||
reader = FormatFactory::instance().getInput(ODBCBridgeHelper::DEFAULT_FORMAT, *read_buf, sample_block, context, max_block_size);
|
reader = FormatFactory::instance().getInput(ODBCBridgeHelper::DEFAULT_FORMAT, *read_buf, sample_block, context, max_block_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ StorageODBC::StorageODBC(const std::string & table_name_,
|
|||||||
|
|
||||||
std::string StorageODBC::getReadMethod() const
|
std::string StorageODBC::getReadMethod() const
|
||||||
{
|
{
|
||||||
return ODBCBridgeHelper::MAIN_METHOD;
|
return Poco::Net::HTTPRequest::HTTP_POST;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<std::string, std::string>> StorageODBC::getReadURIParams(const Names & column_names,
|
std::vector<std::pair<std::string, std::string>> StorageODBC::getReadURIParams(const Names & column_names,
|
||||||
|
Loading…
Reference in New Issue
Block a user