mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-16 21:04:15 +08:00
Untab everything and improve formatting
This commit is contained in:
parent
1987614bfe
commit
628b0bbaff
@ -174,7 +174,8 @@ namespace sqlpp
|
|||||||
connection_pool& operator=(const connection_pool&) = delete;
|
connection_pool& operator=(const connection_pool&) = delete;
|
||||||
connection_pool& operator=(connection_pool&&) = delete;
|
connection_pool& operator=(connection_pool&&) = delete;
|
||||||
|
|
||||||
pool_connection<Connection_config, Connection_validator, Connection> get_connection()
|
auto get_connection()
|
||||||
|
-> pool_connection<Connection_config, Connection_validator, Connection>
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(connection_pool_mutex);
|
std::lock_guard<std::mutex> lock(connection_pool_mutex);
|
||||||
while (true)
|
while (true)
|
||||||
@ -226,9 +227,8 @@ namespace sqlpp
|
|||||||
template<typename Connection_config,
|
template<typename Connection_config,
|
||||||
typename Connection_validator = connection_validator::automatic,
|
typename Connection_validator = connection_validator::automatic,
|
||||||
typename Connection = typename std::enable_if<std::is_class<Connection_config::connection>::value, Connection_config::connection>::type>
|
typename Connection = typename std::enable_if<std::is_class<Connection_config::connection>::value, Connection_config::connection>::type>
|
||||||
connection_pool<Connection_config, Connection_validator, Connection> make_connection_pool(
|
auto make_connection_pool(const std::shared_ptr<Connection_config>& config, size_t max_pool_size)
|
||||||
const std::shared_ptr<Connection_config>& config,
|
-> connection_pool<Connection_config, Connection_validator, Connection>
|
||||||
size_t max_pool_size)
|
|
||||||
{
|
{
|
||||||
return connection_pool<Connection_config, Connection_validator, Connection>(config, max_pool_size);
|
return connection_pool<Connection_config, Connection_validator, Connection>(config, max_pool_size);
|
||||||
}
|
}
|
||||||
|
@ -41,10 +41,13 @@ namespace sqlpp
|
|||||||
Connection_pool* origin;
|
Connection_pool* origin;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
pool_connection() : _impl(nullptr), origin(nullptr) {}
|
pool_connection() : _impl(nullptr), origin(nullptr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
pool_connection(std::unique_ptr<Connection>& connection, Connection_pool* origin)
|
pool_connection(std::unique_ptr<Connection>& connection, Connection_pool* origin) : _impl(std::move(connection)), origin(origin)
|
||||||
: _impl(std::move(connection)), origin(origin) {}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
~pool_connection()
|
~pool_connection()
|
||||||
{
|
{
|
||||||
@ -79,8 +82,9 @@ namespace sqlpp
|
|||||||
}
|
}
|
||||||
|
|
||||||
pool_connection(const pool_connection&) = delete;
|
pool_connection(const pool_connection&) = delete;
|
||||||
pool_connection(pool_connection&& other)
|
pool_connection(pool_connection&& other) : _impl(std::move(other._impl)), origin(other.origin)
|
||||||
: _impl(std::move(other._impl)), origin(other.origin) {}
|
{
|
||||||
|
}
|
||||||
pool_connection& operator=(const pool_connection&) = delete;
|
pool_connection& operator=(const pool_connection&) = delete;
|
||||||
pool_connection& operator=(pool_connection&& other)
|
pool_connection& operator=(pool_connection&& other)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user