Replaced implicit trivial_value_is_null tag for columns with explicit tvin method

This isn't database vendor specific, but library vendor specific, as I
used this implicit behaviour quite a lot, but it is utterly confusing
when mixed with prepared statements. Explicit is better here.
This commit is contained in:
rbock
2014-01-14 22:54:07 +01:00
parent fa18ce5476
commit 9335a62087
16 changed files with 196 additions and 105 deletions

View File

@@ -40,7 +40,12 @@ int main()
TabSample t;
interpret(t.alpha, printer).flush();
interpret(t.alpha = 7, printer).flush();
interpret(t.alpha = 0, printer).flush();
interpret(t.alpha = sqlpp::tvin(0), printer).flush();
interpret(t.alpha == 0, printer).flush();
interpret(t.alpha == sqlpp::tvin(0), printer).flush();
interpret(t.alpha != 0, printer).flush();
interpret(t.gamma != sqlpp::tvin(false), printer).flush();
interpret(t.alpha == 7, printer).flush();
interpret(t.beta + "kaesekuchen", printer).flush();
@@ -58,6 +63,7 @@ int main()
interpret(insert_into(t), printer).flush();
interpret(insert_into(t).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();
return 0;
}