Added dynamic versions of from and where to select

This commit is contained in:
Roland Bock
2013-09-22 20:42:19 +02:00
parent 5576df1775
commit 472833016f
6 changed files with 113 additions and 31 deletions

View File

@@ -262,16 +262,14 @@ int main()
static_assert(std::is_same<A, B>::value, "select with identical columns(name/value_type) need to have identical result_types");
}
#if 0
{
auto s = dynamic_select(db, t);
s = s.add_from(t);
s = s.add_from(t); // This will not be accepted by the SQL server, but it is dynamic and this kind of test is not possible at compile time, I guess
auto s = dynamic_select(db, t).dynamic_from().dynamic_where();
s.add_from(t);
s.add_where(t.alpha > 7);
std::cerr << "------------------------\n";
s.serialize(std::cerr, db);
std::cerr << "------------------------\n";
}
#endif
static_assert(sqlpp::is_select_flag_t<decltype(sqlpp::all)>::value, "sqlpp::all has to be a select_flag");