From 10bdf4cfca995f12cf2701b4007647042b6ef990 Mon Sep 17 00:00:00 2001 From: rbock Date: Fri, 15 Apr 2016 18:21:22 +0200 Subject: [PATCH] Added a few serializer tests for free function select clauses --- include/sqlpp11/having.h | 7 +++++++ include/sqlpp11/sqlpp11.h | 1 + include/sqlpp11/where.h | 12 ++++++++++++ test_serializer/CMakeLists.txt | 1 + 4 files changed, 21 insertions(+) diff --git a/include/sqlpp11/having.h b/include/sqlpp11/having.h index fba6db7e..68e41349 100644 --- a/include/sqlpp11/having.h +++ b/include/sqlpp11/having.h @@ -311,6 +311,13 @@ namespace sqlpp { return statement_t().having(std::forward(t)); } + + template + auto dynamic_having(const Database&, T&& t) + -> decltype(statement_t().dynamic_having(std::forward(t))) + { + return statement_t().dynamic_having(std::forward(t)); + } } #endif diff --git a/include/sqlpp11/sqlpp11.h b/include/sqlpp11/sqlpp11.h index 8c822e49..722a1bcc 100644 --- a/include/sqlpp11/sqlpp11.h +++ b/include/sqlpp11/sqlpp11.h @@ -38,5 +38,6 @@ #include #include #include +#include #endif diff --git a/include/sqlpp11/where.h b/include/sqlpp11/where.h index 018dc509..a2af5cf0 100644 --- a/include/sqlpp11/where.h +++ b/include/sqlpp11/where.h @@ -397,6 +397,18 @@ namespace sqlpp { return statement_t>().where(std::forward(t)); } + + template + auto dynamic_where(const Database&, T&& t) + -> decltype(statement_t>().dynamic_where(std::forward(t))) + { + return statement_t>().dynamic_where(std::forward(t)); + } + + inline auto unconditionally() -> decltype(statement_t>().unconditionally()) + { + return statement_t>().unconditionally(); + } } #endif diff --git a/test_serializer/CMakeLists.txt b/test_serializer/CMakeLists.txt index 6b19a24a..f10ee5bc 100644 --- a/test_serializer/CMakeLists.txt +++ b/test_serializer/CMakeLists.txt @@ -23,6 +23,7 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. set(test_serializer_names + CustomQuery From In Where