diff --git a/include/sqlpp11/pool_connection.h b/include/sqlpp11/pool_connection.h index a668f926..f4eea7dc 100644 --- a/include/sqlpp11/pool_connection.h +++ b/include/sqlpp11/pool_connection.h @@ -57,18 +57,6 @@ namespace sqlpp } } - pool_connection(const pool_connection&) = delete; - pool_connection(pool_connection&& other) : _impl(std::move(other._impl)), origin(other.origin) - { - } - pool_connection& operator=(const pool_connection&) = delete; - pool_connection& operator=(pool_connection&& other) - { - _impl = std::move(other._impl); - origin = other.origin; - return *this; - } - template auto operator()(Args&&... args) -> decltype(_impl->args(std::forward(args)...)) { @@ -93,10 +81,16 @@ namespace sqlpp return _impl->prepare(t); } - template - void operator()(Query query, Lambda callback) + pool_connection(const pool_connection&) = delete; + pool_connection(pool_connection&& other) : _impl(std::move(other._impl)), origin(other.origin) { - query_task(*origin, query, callback)(); + } + pool_connection& operator=(const pool_connection&) = delete; + pool_connection& operator=(pool_connection&& other) + { + _impl = std::move(other._impl); + origin = other.origin; + return *this; } }; }