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