Added value type back to select

This commit is contained in:
rbock
2014-02-08 22:50:26 +01:00
parent 3c6e7cb89a
commit 88fc0959b5
2 changed files with 3 additions and 4 deletions
+2 -1
View File
@@ -86,7 +86,8 @@ namespace sqlpp
// SELECT
template<typename Database, typename... Policies>
struct select_t: public vendor::policy_t<Policies>..., public vendor::crtp_wrapper_t<select_t<Database, Policies...>, Policies>...
struct select_t: public vendor::policy_t<Policies>..., public vendor::crtp_wrapper_t<select_t<Database, Policies...>, Policies>...,
public detail::select_helper_t<Policies...>::_column_list_t::_value_type::template operators<select_t<Database, Policies...>>
{
template<typename Needle, typename Replacement>
using _policy_update_t = select_t<Database, vendor::policy_update_t<Policies, Needle, Replacement>...>;
+1 -3
View File
@@ -363,9 +363,8 @@ int main()
auto z = select(t.alpha) == 7;
auto l = t.as(alias::left);
auto r = select(t.gamma.as(alias::a)).from(t).where(t.gamma == true).as(alias::right);
#if 0
static_assert(sqlpp::is_boolean_t<decltype(select(t.gamma).from(t))>::value, "select(bool) has to be a bool");
interpret(select(sqlpp::distinct, sqlpp::straight_join, l.alpha, l.beta, select(r.a).from(r))
interpret(sqlpp::select().flags(sqlpp::distinct, sqlpp::straight_join).columns(l.alpha, l.beta, select(r.a).from(r))
.from(l, r)
.where(t.beta == "hello world" and select(t.gamma).from(t))// .as(alias::right))
.group_by(l.gamma, r.a)
@@ -375,7 +374,6 @@ int main()
.offset(3)
.as(alias::a)
, printer).flush();
#endif
return 0;
}