diff --git a/include/sqlpp11/with.h b/include/sqlpp11/with.h index 399c94d8..fe3d7bda 100644 --- a/include/sqlpp11/with.h +++ b/include/sqlpp11/with.h @@ -45,6 +45,8 @@ namespace sqlpp template struct with_data_t { + using _is_recursive = logic::any_t; + with_data_t(Expressions... expressions): _expressions(expressions...) {} @@ -74,7 +76,6 @@ namespace sqlpp using _tags = detail::type_set<>; }; - using _is_dynamic = is_database; // Data @@ -172,6 +173,8 @@ namespace sqlpp { // FIXME: If there is a recursive CTE, add a "RECURSIVE" here context << " WITH "; + if (T::_is_recursive::value) + context << "RECURSIVE "; interpret_tuple(t._expressions, ',', context); return context; }