...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Returns the owned connection to the pool and marks it as not requiring reset.
void return_without_reset() noexcept;
Returns a connection to the pool and marks it as idle. This will skip the
any_connection::async_reset_connection
call to
wipe session state.
This can provide a performance gain, but must be used with care. Failing to wipe session state can lead to resource leaks (prepared statements not being released), incorrect results and vulnerabilities (different logical operations interacting due to leftover state).
Please read the documentation on any_connection::async_reset_connection
before
calling this function. If in doubt, don't use it, and leave the destructor
return the connection to the pool for you.
When this function returns, *this
will own nothing (this->valid() == false
).
this->valid() == true
No-throw guarantee.
Causes a mutation on the connection pool that this
points to. Thread-safe for a shared pool only if it was constructed with
pool_params::thread_safe
set to true.