From cf4af171fdc0bdde606448a35ea0270e57dc8071 Mon Sep 17 00:00:00 2001 From: Roland Bock Date: Fri, 30 Aug 2024 13:52:35 +0200 Subject: [PATCH] Add provided tables to select_as. --- include/sqlpp11/core/clause/select_as.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/include/sqlpp11/core/clause/select_as.h b/include/sqlpp11/core/clause/select_as.h index dc53079c..3d3f05a8 100644 --- a/include/sqlpp11/core/clause/select_as.h +++ b/include/sqlpp11/core/clause/select_as.h @@ -81,15 +81,34 @@ namespace sqlpp template struct name_tag_of> : name_tag_of {}; -#warning: Is this (_can_be_used_as_table) required for use as a named value, too? template struct is_table> : std::integral_constant { }; -#warning: V1.0 has empty nodes. Is that correct? In either case document the decision here. + template + struct provided_tables_of> + : public std::conditional>, + sqlpp::detail::type_vector<>> + { + }; + template + struct provided_static_tables_of> + : public provided_tables_of> + { + }; + + template + struct provided_optional_tables_of> + : public provided_tables_of> + { + }; + +#warning: V1.0 has empty nodes. Is that correct? In either case document the decision here. +#warning: Need to add required tables of template auto to_sql_string(Context& context, const select_as_t& t) -> std::string