diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000..f94da0a4
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,53 @@
+Language: Cpp
+AccessModifierOffset: -2
+ConstructorInitializerIndentWidth: 4
+AlignEscapedNewlinesLeft: true
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortBlocksOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AlwaysBreakTemplateDeclarations: true
+AlwaysBreakBeforeMultilineStrings: false
+BreakBeforeBinaryOperators: false
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializersBeforeComma: false
+BinPackParameters: false
+ColumnLimit: 160
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+DerivePointerAlignment: false
+ExperimentalAutoDetectBinPacking: false
+IndentCaseLabels: true
+IndentWrappedFunctionNames: false
+IndentFunctionDeclarationAfterType: false
+MaxEmptyLinesToKeep: 1
+KeepEmptyLinesAtTheStartOfBlocks: false
+NamespaceIndentation: All
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: false
+PenaltyBreakBeforeFirstCallParameter: 1
+PenaltyBreakComment: 300
+PenaltyBreakString: 1000
+PenaltyBreakFirstLessLess: 120
+PenaltyExcessCharacter: 1000000
+PenaltyReturnTypeOnItsOwnLine: 200
+PointerAlignment: Left
+SpacesBeforeTrailingComments: 2
+Cpp11BracedListStyle: true
+Standard: Cpp11
+IndentWidth: 2
+TabWidth: 2
+UseTab: Never
+BreakBeforeBraces: Allman
+SpacesInParentheses: false
+SpacesInAngles: false
+SpaceInEmptyParentheses: false
+SpacesInCStyleCastParentheses: false
+SpacesInContainerLiterals: true
+SpaceBeforeAssignmentOperators: true
+ContinuationIndentWidth: 4
+CommentPragmas: '^ IWYU pragma:'
+ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
+SpaceBeforeParens: ControlStatements
+DisableFormat: false
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b1116b7f..69ca76f5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,6 +36,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall ${CMAKE_CXX_FLAGS}")
endif ()
+set(CMAKE_CXX_FLAGS "-Wconversion -Wpedantic ${CMAKE_CXX_FLAGS}")
set(include_dir "${PROJECT_SOURCE_DIR}/include")
file(GLOB_RECURSE sqlpp_headers "${include_dir}/*.h")
diff --git a/examples/select.cpp b/examples/select.cpp
index 8b4317c2..790fd96b 100644
--- a/examples/select.cpp
+++ b/examples/select.cpp
@@ -37,7 +37,7 @@
static constexpr bool some_condition = true;
static constexpr bool some_other_condition = false;
-SQLPP_ALIAS_PROVIDER(cheesecake);
+SQLPP_ALIAS_PROVIDER(cheesecake)
MockDb db;
@@ -110,7 +110,7 @@ int main()
.from(p.join(x).on(p.feature == x.cheesecake))
.where(true)))
{
- int id = row.id;
+ int64_t id = row.id;
std::string name = row.name;
std::string x_name = row.x.name;
int cheesecake = row.x.cheesecake;
diff --git a/include/sqlpp11/alias_provider.h b/include/sqlpp11/alias_provider.h
index 266ec51e..57d501ca 100644
--- a/include/sqlpp11/alias_provider.h
+++ b/include/sqlpp11/alias_provider.h
@@ -62,35 +62,35 @@ namespace sqlpp
static constexpr bool value = true;
};
- namespace alias
+ inline namespace alias
{
- SQLPP_ALIAS_PROVIDER(a);
- SQLPP_ALIAS_PROVIDER(b);
- SQLPP_ALIAS_PROVIDER(c);
- SQLPP_ALIAS_PROVIDER(d);
- SQLPP_ALIAS_PROVIDER(e);
- SQLPP_ALIAS_PROVIDER(f);
- SQLPP_ALIAS_PROVIDER(g);
- SQLPP_ALIAS_PROVIDER(h);
- SQLPP_ALIAS_PROVIDER(i);
- SQLPP_ALIAS_PROVIDER(j);
- SQLPP_ALIAS_PROVIDER(k);
- SQLPP_ALIAS_PROVIDER(l);
- SQLPP_ALIAS_PROVIDER(m);
- SQLPP_ALIAS_PROVIDER(n);
- SQLPP_ALIAS_PROVIDER(o);
- SQLPP_ALIAS_PROVIDER(p);
- SQLPP_ALIAS_PROVIDER(q);
- SQLPP_ALIAS_PROVIDER(s);
- SQLPP_ALIAS_PROVIDER(t);
- SQLPP_ALIAS_PROVIDER(u);
- SQLPP_ALIAS_PROVIDER(v);
- SQLPP_ALIAS_PROVIDER(w);
- SQLPP_ALIAS_PROVIDER(x);
- SQLPP_ALIAS_PROVIDER(y);
- SQLPP_ALIAS_PROVIDER(z);
- SQLPP_ALIAS_PROVIDER(left);
- SQLPP_ALIAS_PROVIDER(right);
+ SQLPP_ALIAS_PROVIDER(a)
+ SQLPP_ALIAS_PROVIDER(b)
+ SQLPP_ALIAS_PROVIDER(c)
+ SQLPP_ALIAS_PROVIDER(d)
+ SQLPP_ALIAS_PROVIDER(e)
+ SQLPP_ALIAS_PROVIDER(f)
+ SQLPP_ALIAS_PROVIDER(g)
+ SQLPP_ALIAS_PROVIDER(h)
+ SQLPP_ALIAS_PROVIDER(i)
+ SQLPP_ALIAS_PROVIDER(j)
+ SQLPP_ALIAS_PROVIDER(k)
+ SQLPP_ALIAS_PROVIDER(l)
+ SQLPP_ALIAS_PROVIDER(m)
+ SQLPP_ALIAS_PROVIDER(n)
+ SQLPP_ALIAS_PROVIDER(o)
+ SQLPP_ALIAS_PROVIDER(p)
+ SQLPP_ALIAS_PROVIDER(q)
+ SQLPP_ALIAS_PROVIDER(s)
+ SQLPP_ALIAS_PROVIDER(t)
+ SQLPP_ALIAS_PROVIDER(u)
+ SQLPP_ALIAS_PROVIDER(v)
+ SQLPP_ALIAS_PROVIDER(w)
+ SQLPP_ALIAS_PROVIDER(x)
+ SQLPP_ALIAS_PROVIDER(y)
+ SQLPP_ALIAS_PROVIDER(z)
+ SQLPP_ALIAS_PROVIDER(left)
+ SQLPP_ALIAS_PROVIDER(right)
}
}
diff --git a/include/sqlpp11/column.h b/include/sqlpp11/column.h
index 82d34183..83468e5b 100644
--- a/include/sqlpp11/column.h
+++ b/include/sqlpp11/column.h
@@ -54,11 +54,13 @@ namespace sqlpp
struct _recursive_traits
{
- using _parameters = std::tuple<>;
+ using _required_ctes = detail::type_set<>;
+ using _provided_ctes = detail::type_set<>;
+ using _required_tables = detail::type_set
;
using _provided_tables = detail::type_set<>;
using _provided_outer_tables = detail::type_set<>;
- using _required_tables = detail::type_set;
using _extra_tables = detail::type_set<>;
+ using _parameters = std::tuple<>;
using _tags = typename std::conditional::value,
detail::type_set,
detail::type_set<>>::type;
diff --git a/include/sqlpp11/count.h b/include/sqlpp11/count.h
index ffe74bc4..1403aa8b 100644
--- a/include/sqlpp11/count.h
+++ b/include/sqlpp11/count.h
@@ -41,6 +41,8 @@ namespace sqlpp
using _traits = make_traits;
struct _recursive_traits
{
+ using _required_ctes = required_ctes_of;
+ using _provided_ctes = detail::type_set<>;
using _required_tables = required_tables_of;
using _provided_tables = provided_tables_of;
using _provided_outer_tables = provided_outer_tables_of;
diff --git a/include/sqlpp11/cte.h b/include/sqlpp11/cte.h
new file mode 100644
index 00000000..f84f3816
--- /dev/null
+++ b/include/sqlpp11/cte.h
@@ -0,0 +1,286 @@
+/*
+ * Copyright (c) 2013-2014, Roland Bock
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or
+ * other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SQLPP_CTE_H
+#define SQLPP_CTE_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace sqlpp
+{
+ template
+ struct cte_union_t
+ {
+ struct _recursive_traits
+ {
+ using _required_ctes = detail::make_joined_set_t, required_ctes_of>;
+ using _provided_ctes = detail::type_set<>;
+ using _required_tables = detail::type_set<>;
+ using _provided_tables = detail::type_set<>;
+ using _provided_outer_tables = detail::type_set<>;
+ using _extra_tables = detail::type_set<>;
+ using _parameters = detail::make_parameter_tuple_t, parameters_of>;
+ using _tags = detail::type_set<>;
+ };
+
+ cte_union_t(Lhs lhs, Rhs rhs):
+ _lhs(lhs),
+ _rhs(rhs)
+ {}
+
+ cte_union_t(const cte_union_t&) = default;
+ cte_union_t(cte_union_t&&) = default;
+ cte_union_t& operator=(const cte_union_t&) = default;
+ cte_union_t& operator=(cte_union_t&&) = default;
+ ~cte_union_t() = default;
+
+ Lhs _lhs;
+ Rhs _rhs;
+ };
+
+ // Interpreters
+ template
+ struct serializer_t>
+ {
+ using _serialize_check = serialize_check_of;
+ using T = cte_union_t;
+
+ static Context& _(const T& t, Context& context)
+ {
+ context << '(';
+ serialize(t._lhs, context);
+ context << ") UNION ";
+ serialize(Flag{}, context);
+ context << " (";
+ serialize(t._rhs, context);
+ context << ')';
+ return context;
+ }
+ };
+
+ template
+ struct cte_t;
+
+ template
+ struct cte_ref_t;
+
+ template
+ auto from_table(cte_t t) -> cte_ref_t
+ {
+ return cte_ref_t{};
+ }
+
+ template
+ struct from_table_impl>
+ {
+ using type = cte_ref_t;
+ };
+
+
+ template
+ struct cte_column_spec_t
+ {
+ using _alias_t = typename FieldSpec::_alias_t;
+
+ using _traits = make_traits,
+ tag::must_not_insert,
+ tag::must_not_update,
+ tag_if::value>
+ >;
+ };
+
+ template
+ struct make_cte_impl
+ {
+ using type = void;
+ };
+
+ template
+ struct make_cte_impl>
+ {
+ using type = cte_t;
+ };
+
+ template
+ using make_cte_t = typename make_cte_impl>::type;
+
+ template
+ struct cte_t: public member_t, column_t>>...
+ {
+ using _traits = make_traits; // FIXME: is table? really?
+ struct _recursive_traits
+ {
+ using _required_ctes = detail::make_joined_set_t, detail::type_set>;
+ using _provided_ctes = detail::type_set<>;
+ using _required_tables = detail::type_set<>;
+ using _provided_tables = detail::type_set<>;
+ using _provided_outer_tables = detail::type_set<>;
+ using _extra_tables = detail::type_set<>;
+ using _parameters = parameters_of;
+ using _tags = detail::type_set<>;
+ };
+ using _alias_t = typename AliasProvider::_alias_t;
+ constexpr static bool _is_recursive = detail::is_element_of>::value;
+
+ using _column_tuple_t = std::tuple>...>;
+
+ template
+ using _check = logic::all_t::value...>;
+
+ using _result_row_t = result_row_t;
+
+ template
+ auto union_distinct(Rhs rhs) const
+ -> typename std::conditional<_check::value, cte_t, FieldSpecs...>, bad_statement>::type
+ {
+ static_assert(is_statement_t::value, "argument of union call has to be a statement");
+ static_assert(has_policy_t::value, "argument of union call has to be a select");
+ static_assert(has_result_row_t::value, "argument of a union has to be a (complete) select statement");
+
+ static_assert(std::is_same<_result_row_t, get_result_row_t>::value, "both select statements in a union have to have the same result columns (type and name)");
+
+ return _union_impl(_check{}, rhs);
+ }
+
+ template
+ auto union_all(Rhs rhs) const
+ -> typename std::conditional<_check::value, cte_t, FieldSpecs...>, bad_statement>::type
+ {
+ static_assert(is_statement_t::value, "argument of union call has to be a statement");
+ static_assert(has_policy_t::value, "argument of union call has to be a select");
+ static_assert(has_result_row_t::value, "argument of a union has to be a (complete) select statement");
+
+ static_assert(std::is_same<_result_row_t, get_result_row_t>::value, "both select statements in a union have to have the same result columns (type and name)");
+
+ return _union_impl(_check{}, rhs);
+ }
+
+ private:
+ template
+ auto _union_impl(const std::false_type&, Rhs rhs) const
+ -> bad_statement;
+
+ template
+ auto _union_impl(const std::true_type&, Rhs rhs) const
+ -> cte_t, FieldSpecs...>
+ {
+ return cte_union_t{_statement, rhs};
+ }
+
+ public:
+
+ cte_t(Statement statement): _statement(statement){}
+ cte_t(const cte_t&) = default;
+ cte_t(cte_t&&) = default;
+ cte_t& operator=(const cte_t&) = default;
+ cte_t& operator=(cte_t&&) = default;
+ ~cte_t() = default;
+
+ Statement _statement;
+ };
+
+ template
+ struct serializer_t>
+ {
+ using _serialize_check = serialize_check_of;
+ using T = cte_t;
+
+ static Context& _(const T& t, Context& context)
+ {
+ context << name_of::char_ptr() << " AS (";
+ serialize(t._statement, context);
+ context << ")";
+ return context;
+ }
+ };
+
+
+// The cte_t is displayed as AliasProviderName except within the with:
+// - the with needs the
+// AliasProviderName AS (ColumnNames) (select/union)
+// The result row of the select should not have dynamic parts
+ template
+ struct cte_ref_t
+ {
+ using _traits = make_traits; // FIXME: is table? really?
+ struct _recursive_traits
+ {
+ using _required_ctes = detail::make_type_set_t;
+ using _provided_ctes = detail::type_set<>;
+ using _required_tables = detail::type_set<>;
+ using _provided_tables = detail::type_set;
+ using _provided_outer_tables = detail::type_set<>;
+ using _extra_tables = detail::type_set<>;
+ using _parameters = std::tuple<>;
+ using _tags = detail::type_set<>;
+ };
+
+ using _alias_t = typename AliasProvider::_alias_t;
+
+ template
+ auto as(Statement statement)
+ -> make_cte_t
+ {
+ static_assert(required_tables_of::size::value == 0, "common table expression must not use unknown tables");
+ static_assert(not detail::is_element_of>::value, "common table expression must not self-reference in the first part, use union_all/union_distinct for recursion");
+ static_assert(is_static_result_row_t>::value, "ctes must not have dynamically added columns");
+
+ return { statement };
+ }
+ };
+
+ template
+ struct serializer_t>
+ {
+ using _serialize_check = consistent_t;
+ using T = cte_ref_t;
+
+ static Context& _(const T& t, Context& context)
+ {
+ context << name_of::char_ptr();
+ return context;
+ }
+ };
+
+ template
+ auto cte(const AliasProvider&)
+ -> cte_ref_t
+ {
+ return {};
+ }
+
+}
+
+#endif
diff --git a/include/sqlpp11/detail/pick_arg.h b/include/sqlpp11/detail/pick_arg.h
index 10cd512b..6c922516 100644
--- a/include/sqlpp11/detail/pick_arg.h
+++ b/include/sqlpp11/detail/pick_arg.h
@@ -37,20 +37,20 @@ namespace sqlpp
typename Target::_data_t pick_arg_impl(Statement statement, Term term, const std::true_type&)
{
return term;
- };
+ }
template
typename Target::_data_t pick_arg_impl(Statement statement, Term term, const std::false_type&)
{
return Target::_get_member(statement)._data;
- };
+ }
// Returns a statement's term either by picking the term from the statement or using the new term
template
typename Target::_data_t pick_arg(Statement statement, Term term)
{
return pick_arg_impl(statement, term, std::is_same());
- };
+ }
}
}
diff --git a/include/sqlpp11/extra_tables.h b/include/sqlpp11/extra_tables.h
index 884e1946..cd4e1068 100644
--- a/include/sqlpp11/extra_tables.h
+++ b/include/sqlpp11/extra_tables.h
@@ -54,11 +54,13 @@ namespace sqlpp
using _traits = make_traits;
struct _recursive_traits
{
- using _parameters = std::tuple<>;
+ using _required_ctes = detail::make_joined_set_t...>;
+ using _provided_ctes = detail::type_set<>;
using _required_tables = detail::type_set<>;
using _provided_outer_tables = detail::type_set<>;
using _provided_tables = detail::type_set<>;
using _extra_tables = detail::type_set;
+ using _parameters = std::tuple<>;
using _tags = detail::type_set<>;
};
diff --git a/include/sqlpp11/from.h b/include/sqlpp11/from.h
index bbe7d939..37f5b68a 100644
--- a/include/sqlpp11/from.h
+++ b/include/sqlpp11/from.h
@@ -27,6 +27,7 @@
#ifndef SQLPP_FROM_H
#define SQLPP_FROM_H
+#include
#include
#include
#include
@@ -90,7 +91,7 @@ namespace sqlpp
template
void _add_impl(Table table, const std::true_type&)
{
- return _data._dynamic_tables.emplace_back(table);
+ return _data._dynamic_tables.emplace_back(from_table(table));
}
template
@@ -164,7 +165,7 @@ namespace sqlpp
template
auto from(Tables... tables) const
- -> _new_statement_t<_check, from_t>
+ -> _new_statement_t<_check, from_t...>>
{
static_assert(_check::value, "at least one argument is not a table or join in from()");
static_assert(sizeof...(Tables), "at least one table or join argument required in from()");
@@ -173,7 +174,7 @@ namespace sqlpp
template
auto dynamic_from(Tables... tables) const
- -> _new_statement_t<_check, from_t<_database_t, Tables...>>
+ -> _new_statement_t<_check, from_t<_database_t, from_table_t...>>
{
static_assert(not std::is_same<_database_t, void>::value, "dynamic_from must not be called in a static statement");
static_assert(_check::value, "at least one argument is not a table or join in from()");
@@ -187,7 +188,7 @@ namespace sqlpp
template
auto _from_impl(const std::true_type&, Tables... tables) const
- -> _new_statement_t>
+ -> _new_statement_t...>>
{
static_assert(required_tables_of>::size::value == 0, "at least one table depends on another table in from()");
@@ -197,7 +198,7 @@ namespace sqlpp
static_assert(_number_of_tables == _unique_tables::size::value, "at least one duplicate table detected in from()");
static_assert(_number_of_tables == _unique_table_names::size::value, "at least one duplicate table name detected in from()");
- return { static_cast&>(*this), from_data_t{tables...} };
+ return { static_cast&>(*this), from_data_t...>{from_table(tables)...} };
}
};
diff --git a/include/sqlpp11/group_by.h b/include/sqlpp11/group_by.h
index a8f73185..52c2d53d 100644
--- a/include/sqlpp11/group_by.h
+++ b/include/sqlpp11/group_by.h
@@ -211,7 +211,7 @@ namespace sqlpp
static_assert(not detail::has_duplicates::value, "at least one duplicate argument detected in group_by()");
return { static_cast&>(*this), group_by_data_t{expressions...} };
- };
+ }
};
};
diff --git a/include/sqlpp11/insert_value_list.h b/include/sqlpp11/insert_value_list.h
index a0763799..1cc86f62 100644
--- a/include/sqlpp11/insert_value_list.h
+++ b/include/sqlpp11/insert_value_list.h
@@ -315,7 +315,7 @@ namespace sqlpp
static void _()
{
static_assert(wrong_t::value, "insert values required, e.g. set(...) or default_values()");
- };
+ }
};
// NO INSERT COLUMNS/VALUES YET
diff --git a/include/sqlpp11/interpret_tuple.h b/include/sqlpp11/interpret_tuple.h
index 36c047b7..a51a8288 100644
--- a/include/sqlpp11/interpret_tuple.h
+++ b/include/sqlpp11/interpret_tuple.h
@@ -54,7 +54,9 @@ namespace sqlpp
// See also: "http://stackoverflow.com/questions/6245735/pretty-print-stdtuple/6245777#6245777"
// Beware of gcc-bug: "http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51253", otherwise an empty swallow struct could be used
using swallow = int[];
- (void) swallow{(interpret_tuple_element(std::get(t), separator, context, useBraces, Is), 0)...};
+ (void) swallow{
+ 0, //workaround against -Wpedantic GCC warning "zero-size array 'int [0]'"
+ (interpret_tuple_element(std::get(t), separator, context, useBraces, Is), 0)...};
return context;
}
diff --git a/include/sqlpp11/join.h b/include/sqlpp11/join.h
index 99dbcdd0..e4dcb97f 100644
--- a/include/sqlpp11/join.h
+++ b/include/sqlpp11/join.h
@@ -68,6 +68,8 @@ namespace sqlpp
using _traits = make_traits;
struct _recursive_traits
{
+ using _required_ctes = detail::make_joined_set_t, required_ctes_of>;
+ using _provided_ctes = detail::type_set<>;
using _required_tables = detail::make_joined_set_t, required_tables_of>;
using _provided_tables = detail::make_joined_set_t, provided_tables_of>;
using _provided_outer_tables = typename JoinType::template _provided_outer_tables;
diff --git a/include/sqlpp11/order_by.h b/include/sqlpp11/order_by.h
index daf50517..32f7a0b8 100644
--- a/include/sqlpp11/order_by.h
+++ b/include/sqlpp11/order_by.h
@@ -211,7 +211,7 @@ namespace sqlpp
static_assert(not detail::has_duplicates::value, "at least one duplicate argument detected in order_by()");
return { static_cast&>(*this), order_by_data_t{expressions...} };
- };
+ }
};
};
diff --git a/include/sqlpp11/parameter.h b/include/sqlpp11/parameter.h
index b5daaabc..542a5cb1 100644
--- a/include/sqlpp11/parameter.h
+++ b/include/sqlpp11/parameter.h
@@ -40,11 +40,13 @@ namespace sqlpp
using _traits = make_traits;
struct _recursive_traits
{
- using _parameters = std::tuple;
+ using _required_ctes = detail::type_set<>;
+ using _provided_ctes = detail::type_set<>;
+ using _required_tables = detail::type_set<>;
using _provided_tables = detail::type_set<>;
using _provided_outer_tables = detail::type_set<>;
- using _required_tables = detail::type_set<>;
using _extra_tables = detail::type_set<>;
+ using _parameters = std::tuple;
using _tags = detail::type_set;
};
diff --git a/include/sqlpp11/result_field_methods.h b/include/sqlpp11/result_field_methods.h
index 5829ba91..4ab50af9 100644
--- a/include/sqlpp11/result_field_methods.h
+++ b/include/sqlpp11/result_field_methods.h
@@ -83,11 +83,13 @@ namespace sqlpp
struct _recursive_traits
{
- using _parameters = std::tuple<>;
+ using _required_ctes = detail::type_set<>;
+ using _provided_ctes = detail::type_set<>;
+ using _required_tables = detail::type_set<>;
using _provided_tables = detail::type_set<>;
using _provided_outer_tables = detail::type_set<>;
- using _required_tables = detail::type_set<>;
using _extra_tables = detail::type_set<>;
+ using _parameters = std::tuple<>;
using _tags = typename std::conditional::value,
detail::type_set,
detail::type_set<>>::type;
diff --git a/include/sqlpp11/result_row.h b/include/sqlpp11/result_row.h
index f9e21fcf..67574354 100644
--- a/include/sqlpp11/result_row.h
+++ b/include/sqlpp11/result_row.h
@@ -28,6 +28,7 @@
#define SQLPP_RESULT_ROW_H
#include