From f25b9e2ae723dea308d00fa9e36771e9b95e6c3b Mon Sep 17 00:00:00 2001 From: Daniel Frey Date: Wed, 13 Dec 2023 00:21:11 +0100 Subject: [PATCH] Move check for current transaction --- include/tao/pq/transaction.hpp | 1 - src/lib/pq/transaction.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tao/pq/transaction.hpp b/include/tao/pq/transaction.hpp index ab948b8..761ea3e 100644 --- a/include/tao/pq/transaction.hpp +++ b/include/tao/pq/transaction.hpp @@ -96,7 +96,6 @@ namespace tao::pq template< typename... As > void send( const internal::zsv statement, As&&... as ) { - check_current_transaction(); if constexpr( sizeof...( As ) == 0 ) { send_params( statement, 0, nullptr, nullptr, nullptr, nullptr ); } diff --git a/src/lib/pq/transaction.cpp b/src/lib/pq/transaction.cpp index 0da415a..239babb 100644 --- a/src/lib/pq/transaction.cpp +++ b/src/lib/pq/transaction.cpp @@ -128,6 +128,7 @@ namespace tao::pq const int lengths[], const int formats[] ) { + check_current_transaction(); m_connection->send_params( statement, n_params, types, values, lengths, formats ); }