Renamed ODBCConnectionFactory to ODBCPooledConntionFactory

This commit is contained in:
Anton Kozlov 2022-06-01 09:00:39 +00:00
parent 3576625647
commit e9d645168e
8 changed files with 13 additions and 13 deletions

View File

@ -17,7 +17,7 @@
#include <Common/quoteString.h>
#include "getIdentifierQuote.h"
#include "validateODBCConnectionString.h"
#include "ODBCConnectionFactory.h"
#include "ODBCPooledConnectionFactory.h"
#include <sql.h>
#include <sqlext.h>
@ -105,7 +105,7 @@ void ODBCColumnsInfoHandler::handleRequest(HTTPServerRequest & request, HTTPServ
{
const bool external_table_functions_use_nulls = Poco::NumberParser::parseBool(params.get("external_table_functions_use_nulls", "false"));
auto connection_holder = ODBCConnectionFactory::instance().get(
auto connection_holder = ODBCPooledConnectionFactory::instance().get(
validateODBCConnectionString(connection_string),
getContext()->getSettingsRef().odbc_bridge_connection_pool_size);

View File

@ -14,7 +14,7 @@
#include <base/scope_guard.h>
#include "getIdentifierQuote.h"
#include "validateODBCConnectionString.h"
#include "ODBCConnectionFactory.h"
#include "ODBCPooledConnectionFactory.h"
namespace DB
@ -42,7 +42,7 @@ void IdentifierQuoteHandler::handleRequest(HTTPServerRequest & request, HTTPServ
{
std::string connection_string = params.get("connection_string");
auto connection = ODBCConnectionFactory::instance().get(
auto connection = ODBCPooledConnectionFactory::instance().get(
validateODBCConnectionString(connection_string),
getContext()->getSettingsRef().odbc_bridge_connection_pool_size);

View File

@ -112,7 +112,7 @@ void ODBCHandler::handleRequest(HTTPServerRequest & request, HTTPServerResponse
{
nanodbc::ConnectionHolderPtr connection_handler;
if (getContext()->getSettingsRef().odbc_bridge_use_connection_pooling)
connection_handler = ODBCConnectionFactory::instance().get(
connection_handler = ODBCPooledConnectionFactory::instance().get(
validateODBCConnectionString(connection_string), getContext()->getSettingsRef().odbc_bridge_connection_pool_size);
else
connection_handler = std::make_shared<nanodbc::ConnectionHolder>(validateODBCConnectionString(connection_string));

View File

@ -4,7 +4,7 @@
#include <Core/Block.h>
#include <Processors/ISource.h>
#include <Core/ExternalResultDescription.h>
#include "ODBCConnectionFactory.h"
#include "ODBCPooledConnectionFactory.h"
namespace DB

View File

@ -5,7 +5,7 @@
#include <Core/ExternalResultDescription.h>
#include <Parsers/IdentifierQuotingStyle.h>
#include <Interpreters/Context_fwd.h>
#include "ODBCConnectionFactory.h"
#include "ODBCPooledConnectionFactory.h"
namespace DB

View File

@ -124,12 +124,12 @@ T execute(nanodbc::ConnectionHolderPtr connection_holder, std::function<T(nanodb
}
class ODBCConnectionFactory final : private boost::noncopyable
class ODBCPooledConnectionFactory final : private boost::noncopyable
{
public:
static ODBCConnectionFactory & instance()
static ODBCPooledConnectionFactory & instance()
{
static ODBCConnectionFactory ret;
static ODBCPooledConnectionFactory ret;
return ret;
}

View File

@ -9,7 +9,7 @@
#include <Poco/Net/HTTPServerResponse.h>
#include <Common/logger_useful.h>
#include "validateODBCConnectionString.h"
#include "ODBCConnectionFactory.h"
#include "ODBCPooledConnectionFactory.h"
#include <sql.h>
#include <sqlext.h>
@ -50,7 +50,7 @@ void SchemaAllowedHandler::handleRequest(HTTPServerRequest & request, HTTPServer
{
std::string connection_string = params.get("connection_string");
auto connection = ODBCConnectionFactory::instance().get(
auto connection = ODBCPooledConnectionFactory::instance().get(
validateODBCConnectionString(connection_string),
getContext()->getSettingsRef().odbc_bridge_connection_pool_size);

View File

@ -8,7 +8,7 @@
#include <Poco/Logger.h>
#include <Poco/Net/HTTPRequestHandler.h>
#include <Parsers/IdentifierQuotingStyle.h>
#include "ODBCConnectionFactory.h"
#include "ODBCPooledConnectionFactory.h"
namespace DB