mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
rename function
This commit is contained in:
parent
b05c968bb2
commit
5f0a5dd0e9
@ -44,6 +44,8 @@ namespace sqlpp
|
|||||||
unsigned int maximum_pool_size = 0;
|
unsigned int maximum_pool_size = 0;
|
||||||
std::stack<std::unique_ptr<Connection>> free_connections;
|
std::stack<std::unique_ptr<Connection>> free_connections;
|
||||||
|
|
||||||
|
bool is_connection_compatible(const std::unique_ptr<Connection>& connection) {
|
||||||
|
return connection->get_config().get() == this->config.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -105,6 +107,7 @@ namespace sqlpp
|
|||||||
{
|
{
|
||||||
if (connection.get())
|
if (connection.get())
|
||||||
{
|
{
|
||||||
|
if (is_connection_compatible(connection))
|
||||||
{
|
{
|
||||||
free_connections.push(std::move(connection));
|
free_connections.push(std::move(connection));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user