mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-05 12:40:40 -06:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user