From 6906a8d2d231191f4e3c81fb3988a11cc8a3489d Mon Sep 17 00:00:00 2001 From: Nikolay Date: Wed, 18 Dec 2024 14:36:27 +0700 Subject: [PATCH] [-] static assert fix regarding connection type. Since now pooled_connections are allowed to process postgres-dynamic-queries --- include/sqlpp11/postgresql/insert.h | 4 ++-- include/sqlpp11/postgresql/remove.h | 4 ++-- include/sqlpp11/postgresql/returning.h | 2 +- include/sqlpp11/postgresql/update.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/sqlpp11/postgresql/insert.h b/include/sqlpp11/postgresql/insert.h index c77ce513..bda6b525 100644 --- a/include/sqlpp11/postgresql/insert.h +++ b/include/sqlpp11/postgresql/insert.h @@ -52,14 +52,14 @@ namespace sqlpp template constexpr auto dynamic_insert(const Database&) -> decltype(blank_insert_t()) { - static_assert(std::is_base_of::value, "Invalid database parameter"); + static_assert(std::is_base_of::value, "Invalid database parameter"); return {blank_insert_t()}; } template constexpr auto dynamic_insert_into(const Database&, Table table) -> decltype(blank_insert_t().into(table)) { - static_assert(std::is_base_of::value, "Invalid database parameter"); + static_assert(std::is_base_of::value, "Invalid database parameter"); return {blank_insert_t().into(table)}; } } // namespace postgresql diff --git a/include/sqlpp11/postgresql/remove.h b/include/sqlpp11/postgresql/remove.h index d7ffb6a6..3264168c 100644 --- a/include/sqlpp11/postgresql/remove.h +++ b/include/sqlpp11/postgresql/remove.h @@ -50,7 +50,7 @@ namespace sqlpp template auto dynamic_remove(const Database& /*unused*/) -> decltype(blank_remove_t()) { - static_assert(std::is_base_of::value, "Invalid database parameter"); + static_assert(std::is_base_of::value, "Invalid database parameter"); return {blank_remove_t()}; } @@ -58,7 +58,7 @@ namespace sqlpp auto dynamic_remove_from(const Database& /*unused*/, Table table) -> decltype(blank_remove_t().from(table)) { - static_assert(std::is_base_of::value, "Invalid database parameter"); + static_assert(std::is_base_of::value, "Invalid database parameter"); return {blank_remove_t().from(table)}; } } // namespace postgresql diff --git a/include/sqlpp11/postgresql/returning.h b/include/sqlpp11/postgresql/returning.h index 296ba124..1eab557a 100644 --- a/include/sqlpp11/postgresql/returning.h +++ b/include/sqlpp11/postgresql/returning.h @@ -163,7 +163,7 @@ namespace sqlpp "at least one returnable expression (e.g. a column) is required in returning"); static_assert(decltype(_check_args(columns...))::value, "at least one argument is not a returnable expression in returning()"); - static_assert(std::is_base_of::value, "Invalid database parameter"); + static_assert(std::is_base_of::value, "Invalid database parameter"); return {static_cast&>(*this), typename dynamic_returning_column_list<_database_t>::_data_t{columns...}}; } diff --git a/include/sqlpp11/postgresql/update.h b/include/sqlpp11/postgresql/update.h index 36bcfdfc..5a688ffb 100644 --- a/include/sqlpp11/postgresql/update.h +++ b/include/sqlpp11/postgresql/update.h @@ -47,7 +47,7 @@ namespace sqlpp constexpr auto dynamic_update(const Database&, Table table) -> decltype(blank_update_t().single_table(table)) { - static_assert(std::is_base_of::value, "Invalid database parameter"); + static_assert(std::is_base_of::value, "Invalid database parameter"); return {blank_update_t().single_table(table)}; } }