mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Fixed hidden return type parts in custom query
This commit is contained in:
parent
82278f80ae
commit
33992a6651
@ -40,11 +40,23 @@ namespace sqlpp
|
|||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
|
template <typename T>
|
||||||
|
struct unhide
|
||||||
|
{
|
||||||
|
using type = T;
|
||||||
|
};
|
||||||
|
template <typename Clause>
|
||||||
|
struct unhide<hidden_t<Clause>>
|
||||||
|
{
|
||||||
|
using type = Clause;
|
||||||
|
};
|
||||||
|
|
||||||
template <typename Db, typename... Parts>
|
template <typename Db, typename... Parts>
|
||||||
struct custom_parts_t
|
struct custom_parts_t
|
||||||
{
|
{
|
||||||
using _custom_query_t = custom_query_t<Db, Parts...>;
|
using _custom_query_t = custom_query_t<Db, Parts...>;
|
||||||
using _result_type_provider = detail::get_first_if<is_return_value_t, noop, Parts...>;
|
using _maybe_hidden_result_type_provider = detail::get_first_if<is_return_value_t, noop, Parts...>;
|
||||||
|
using _result_type_provider = typename unhide<_maybe_hidden_result_type_provider>::type;
|
||||||
using _result_methods_t = typename _result_type_provider::template _result_methods_t<_result_type_provider>;
|
using _result_methods_t = typename _result_type_provider::template _result_methods_t<_result_type_provider>;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user