From 38e5b21dbe86e7db01bb15a0c1e8e07a525cf4dc Mon Sep 17 00:00:00 2001 From: rbock Date: Sun, 17 Apr 2016 17:31:15 +0200 Subject: [PATCH] Fixed regressions occurring in sqlpp11-connector-mysql --- include/sqlpp11/dynamic_select_column_list.h | 10 ++++++++++ include/sqlpp11/insert_value_list.h | 1 + include/sqlpp11/select_column_list.h | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/sqlpp11/dynamic_select_column_list.h b/include/sqlpp11/dynamic_select_column_list.h index d02f5269..30beffbc 100644 --- a/include/sqlpp11/dynamic_select_column_list.h +++ b/include/sqlpp11/dynamic_select_column_list.h @@ -52,6 +52,11 @@ namespace sqlpp { return _dynamic_columns.empty(); } + + auto size() -> size_t + { + return _dynamic_columns.size(); + } }; template <> @@ -64,6 +69,11 @@ namespace sqlpp { return true; } + + static constexpr auto size() -> size_t + { + return {}; + } }; template diff --git a/include/sqlpp11/insert_value_list.h b/include/sqlpp11/insert_value_list.h index 46e8b4ea..391af7a9 100644 --- a/include/sqlpp11/insert_value_list.h +++ b/include/sqlpp11/insert_value_list.h @@ -39,6 +39,7 @@ #include #include #include +#include namespace sqlpp { diff --git a/include/sqlpp11/select_column_list.h b/include/sqlpp11/select_column_list.h index 3ab677fa..d96cf2e3 100644 --- a/include/sqlpp11/select_column_list.h +++ b/include/sqlpp11/select_column_list.h @@ -264,7 +264,7 @@ namespace sqlpp size_t get_no_of_result_columns() const { - return sizeof...(Columns) + get_dynamic_names().size(); + return sizeof...(Columns) + _get_statement().get_selected_columns()._data._dynamic_columns.size(); } // Execute