MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / updateConnection

Method updateConnection

src/Core/PostgreSQL/Connection.cpp:57–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void Connection::updateConnection()
58{
59 if (connection)
60 connection->close();
61
62 /// Always throws if there is no connection.
63 connection = std::make_unique<pqxx::connection>(connection_info.connection_string);
64
65 if (replication)
66 connection->set_variable("default_transaction_isolation", "'repeatable read'");
67
68 LOG_DEBUG(getLogger("PostgreSQLConnection"), "New connection to {}", connection_info.host_port);
69}
70
71void Connection::connect()
72{

Callers 1

updateMethod · 0.80

Calls 2

getLoggerFunction · 0.50
closeMethod · 0.45

Tested by

no test coverage detected