diff --git a/include/sqlpp11/core/aggregate_function/enable_over.h b/include/sqlpp11/core/aggregate_function/enable_over.h index 37724d7f..9864fbc9 100644 --- a/include/sqlpp11/core/aggregate_function/enable_over.h +++ b/include/sqlpp11/core/aggregate_function/enable_over.h @@ -47,7 +47,6 @@ namespace sqlpp } }; -#warning: Need to use in tests template struct has_enabled_over : public std::is_base_of, T> { diff --git a/include/sqlpp11/core/basic/enable_join.h b/include/sqlpp11/core/basic/enable_join.h index eb8adfea..60a86f6a 100644 --- a/include/sqlpp11/core/basic/enable_join.h +++ b/include/sqlpp11/core/basic/enable_join.h @@ -41,41 +41,40 @@ namespace sqlpp public: template - auto join(T t) const -> decltype(::sqlpp::join(this->derived(), t)) + auto join(T t) const -> decltype(::sqlpp::join(this->derived(), std::move(t))) { -#warning: move? - return ::sqlpp::join(this->derived(), t); + return ::sqlpp::join(this->derived(), std::move(t)); } template - auto inner_join(T t) const -> decltype(::sqlpp::inner_join(this->derived(), t)) + auto inner_join(T t) const -> decltype(::sqlpp::inner_join(this->derived(), std::move(t))) { - return ::sqlpp::inner_join(this->derived(), t); + return ::sqlpp::inner_join(this->derived(), std::move(t)); } template - auto left_outer_join(T t) const -> decltype(::sqlpp::left_outer_join(this->derived(), t)) + auto left_outer_join(T t) const -> decltype(::sqlpp::left_outer_join(this->derived(), std::move(t))) { - return ::sqlpp::left_outer_join(this->derived(), t); + return ::sqlpp::left_outer_join(this->derived(), std::move(t)); } template - auto right_outer_join(T t) const -> decltype(::sqlpp::right_outer_join(this->derived(), t)) + auto right_outer_join(T t) const -> decltype(::sqlpp::right_outer_join(this->derived(), std::move(t))) { - return ::sqlpp::right_outer_join(this->derived(), t); + return ::sqlpp::right_outer_join(this->derived(), std::move(t)); } #warning: There is no full_outer_join in mysql? template - auto full_outer_join(T t) const -> decltype(::sqlpp::full_outer_join(this->derived(), t)) + auto full_outer_join(T t) const -> decltype(::sqlpp::full_outer_join(this->derived(), std::move(t))) { - return ::sqlpp::full_outer_join(this->derived(), t); + return ::sqlpp::full_outer_join(this->derived(), std::move(t)); } template - auto cross_join(T t) const -> decltype(::sqlpp::cross_join(this->derived(), t)) + auto cross_join(T t) const -> decltype(::sqlpp::cross_join(this->derived(), std::move(t))) { - return ::sqlpp::cross_join(this->derived(), t); + return ::sqlpp::cross_join(this->derived(), std::move(t)); } }; } // namespace sqlpp diff --git a/include/sqlpp11/core/clause/delete_from.h b/include/sqlpp11/core/clause/delete_from.h index 97145268..59b54f1f 100644 --- a/include/sqlpp11/core/clause/delete_from.h +++ b/include/sqlpp11/core/clause/delete_from.h @@ -41,11 +41,6 @@ namespace sqlpp }; struct delete_t : public statement_name_t { - using _traits = make_traits; - struct _sqlpp_name_tag - { - }; - template struct _result_methods_t { diff --git a/include/sqlpp11/core/clause/insert.h b/include/sqlpp11/core/clause/insert.h index b51db566..f87fdd3e 100644 --- a/include/sqlpp11/core/clause/insert.h +++ b/include/sqlpp11/core/clause/insert.h @@ -43,11 +43,6 @@ namespace sqlpp struct insert_t : public statement_name_t { - using _traits = make_traits; - struct _sqlpp_name_tag - { - }; - template struct _result_methods_t { diff --git a/include/sqlpp11/core/clause/into.h b/include/sqlpp11/core/clause/into.h index 37b10a95..f8065b87 100644 --- a/include/sqlpp11/core/clause/into.h +++ b/include/sqlpp11/core/clause/into.h @@ -55,14 +55,8 @@ namespace sqlpp template struct into_t { - using _traits = make_traits; - using _data_t = into_data_t; - struct _sqlpp_name_tag - { - }; - // Base template to be inherited by the statement template struct _base_t diff --git a/include/sqlpp11/core/clause/select_column_list.h b/include/sqlpp11/core/clause/select_column_list.h index a504d916..75da89ec 100644 --- a/include/sqlpp11/core/clause/select_column_list.h +++ b/include/sqlpp11/core/clause/select_column_list.h @@ -253,10 +253,6 @@ namespace sqlpp { using _traits = make_traits; - struct _sqlpp_name_tag - { - }; - using _data_t = no_data_t; // Base template to be inherited by the statement diff --git a/include/sqlpp11/core/clause/single_table.h b/include/sqlpp11/core/clause/single_table.h index 8891107a..58616194 100644 --- a/include/sqlpp11/core/clause/single_table.h +++ b/include/sqlpp11/core/clause/single_table.h @@ -54,18 +54,12 @@ namespace sqlpp template struct single_table_t { - using _traits = make_traits; - -#warning: can't we do this with a table_t<> specialization +#warning: can't we do this with a table_t<> specialization? static_assert(is_table
::value, "argument has to be a table"); static_assert(required_tables_of_t
::empty(), "table depends on another table"); using _data_t = single_table_data_t
; - struct _sqlpp_name_tag - { - }; - // Base template to be inherited by the statement template struct _base_t diff --git a/include/sqlpp11/core/clause/update.h b/include/sqlpp11/core/clause/update.h index f6841f46..c653f410 100644 --- a/include/sqlpp11/core/clause/update.h +++ b/include/sqlpp11/core/clause/update.h @@ -43,11 +43,6 @@ namespace sqlpp struct update_t : public statement_name_t { - using _traits = make_traits; - struct _sqlpp_name_tag - { - }; - template struct _result_methods_t { diff --git a/include/sqlpp11/core/database/parameter_list.h b/include/sqlpp11/core/database/parameter_list.h index 78ddb22a..559a0df9 100644 --- a/include/sqlpp11/core/database/parameter_list.h +++ b/include/sqlpp11/core/database/parameter_list.h @@ -64,7 +64,6 @@ namespace sqlpp } }; -#warning: Why would we need this? template using make_parameter_list_t = parameter_list_t>; } // namespace sqlpp diff --git a/include/sqlpp11/core/group_by_column.h b/include/sqlpp11/core/group_by_column.h index b3aea711..0ab3de6c 100644 --- a/include/sqlpp11/core/group_by_column.h +++ b/include/sqlpp11/core/group_by_column.h @@ -71,7 +71,6 @@ namespace sqlpp template auto to_sql_string(Context& context, const group_by_column& t) -> std::string { -#warning: Untested return to_sql_string(context, t._expr); } @@ -84,7 +83,5 @@ template > return {std::move(expr)}; } -#warning Add tests - } // namespace sqlpp11 diff --git a/include/sqlpp11/core/noop.h b/include/sqlpp11/core/noop.h index 455c1d62..2395755e 100644 --- a/include/sqlpp11/core/noop.h +++ b/include/sqlpp11/core/noop.h @@ -35,13 +35,6 @@ namespace sqlpp struct noop { #warning: All this should go away - using _traits = make_traits; - using _nodes = detail::type_vector<>; - - struct _sqlpp_name_tag - { - }; - template struct _result_methods_t { diff --git a/include/sqlpp11/core/type_traits/group_by_column.h b/include/sqlpp11/core/type_traits/group_by_column.h index 2bd57542..91d619bc 100644 --- a/include/sqlpp11/core/type_traits/group_by_column.h +++ b/include/sqlpp11/core/type_traits/group_by_column.h @@ -40,7 +40,5 @@ namespace sqlpp { }; -#warning Add tests - } // namespace sqlpp11 diff --git a/include/sqlpp11/postgresql/returning_column_list.h b/include/sqlpp11/postgresql/returning_column_list.h index b3c0cf13..87a93e97 100644 --- a/include/sqlpp11/postgresql/returning_column_list.h +++ b/include/sqlpp11/postgresql/returning_column_list.h @@ -218,11 +218,6 @@ namespace sqlpp struct no_returning_column_list_t { using _traits = make_traits; - using _nodes = ::sqlpp::detail::type_vector<>; - - struct _sqlpp_name_tag - { - }; // Data using _data_t = no_data_t; diff --git a/include/sqlpp11/sqlite3/insert_or.h b/include/sqlpp11/sqlite3/insert_or.h index e632ae48..31774bde 100644 --- a/include/sqlpp11/sqlite3/insert_or.h +++ b/include/sqlpp11/sqlite3/insert_or.h @@ -49,11 +49,6 @@ namespace sqlpp template struct insert_or_t : public statement_name_t { - using _traits = make_traits; - struct _sqlpp_name_tag - { - }; - template struct _result_methods_t { diff --git a/tests/core/types/clause/group_by.cpp b/tests/core/types/clause/group_by.cpp index 4d8ed5e1..f97a3081 100644 --- a/tests/core/types/clause/group_by.cpp +++ b/tests/core/types/clause/group_by.cpp @@ -40,6 +40,9 @@ void test_group_by() auto col_int = test::TabFoo{}.id; auto col_txt = test::TabFoo{}.textNnD; + // Test that declared group by columns are considered group by columns + static_assert(sqlpp::is_group_by_column::value, ""); + // Constant values are neutral and therefore considered neither aggregate and non-aggregate. static_assert(decltype(known_aggregate_columns_as_expected(col_int))::value, ""); static_assert(decltype(known_aggregate_columns_as_expected(col_int, col_txt))::value, "");