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