mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-05-02 17:09:46 -05:00
Added a .where(bool) to choose all or no row
This commit is contained in:
@@ -41,6 +41,7 @@ SQLPP_ALIAS_PROVIDER(kaesekuchen);
|
||||
int main()
|
||||
{
|
||||
TabSample t;
|
||||
TabFoo f;
|
||||
|
||||
interpret(t.alpha, printer).flush();
|
||||
interpret(-t.alpha, printer).flush();
|
||||
@@ -68,7 +69,7 @@ int main()
|
||||
interpret(t.alpha == parameter(t.alpha) and (t.beta + "gimmick").like(parameter(t.beta)), printer).flush();
|
||||
|
||||
interpret(insert_into(t), printer).flush();
|
||||
interpret(insert_into(t).default_values(), printer).flush();
|
||||
interpret(insert_into(f).default_values(), printer).flush();
|
||||
interpret(insert_into(t).set(t.gamma = true), printer).flush();
|
||||
interpret(insert_into(t).set(t.gamma = sqlpp::tvin(false)), printer).flush();
|
||||
|
||||
@@ -119,5 +120,8 @@ int main()
|
||||
interpret(avg(sqlpp::distinct, t.alpha - 7), printer).flush();
|
||||
interpret(sum(sqlpp::distinct, t.alpha + 7), printer).flush();
|
||||
|
||||
interpret(select(all_of(t)).from(t).where(true), printer).flush();
|
||||
interpret(select(all_of(t)).from(t).where(false), printer).flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user