diff --git a/include/sqlpp11/connection_pool.h b/include/sqlpp11/connection_pool.h index 007ccfd1..805d6246 100644 --- a/include/sqlpp11/connection_pool.h +++ b/include/sqlpp11/connection_pool.h @@ -24,6 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#pragma once + #ifndef SQLPP_CONNECTION_POOL_H #define SQLPP_CONNECTION_POOL_H @@ -36,6 +38,7 @@ #include #include #include +#include namespace sqlpp { @@ -206,6 +209,12 @@ namespace sqlpp throw sqlpp::exception("Failed to spawn a new connection."); } } + + template + void operator()(Query query, Lambda callback) + { + query_task(*this, query, callback)(); + } }; template