From 510f1f83c41470635a1b0bb45fe08477e1ad5bc7 Mon Sep 17 00:00:00 2001 From: Frank Park Date: Tue, 11 Apr 2017 14:55:09 -0400 Subject: [PATCH] Revert "Add operator() to allow query with callback" This reverts commit f3b9442c9fe85954d11b0a75bff99ae38e7900cd. --- include/sqlpp11/pool_connection.h | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) 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; } }; }