mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-06 13:10:34 -06:00
Remove tvin
This was a special feature for a project I was working on long ago. It provided implicit behavior for trivial value (0 or "") which were supposed to be interpreted as NULL. They led to `operator==` potentially being serialized as 'IS NULL'. It makes more sense to introduce explicit helpers, e.g. - equal_or_is_null(col, optional) - not_equal_or_is_not_null(col, optional)
This commit is contained in:
@@ -87,12 +87,12 @@ int Insert(int, char*[])
|
||||
|
||||
db(multi_insert);
|
||||
|
||||
auto values = [&t]() { return std::make_tuple(t.gamma = true, t.delta = sqlpp::tvin(0)); };
|
||||
auto values = [&t]() { return std::make_tuple(t.gamma = true, t.beta = sqlpp::null); };
|
||||
|
||||
db(insert_into(t).set(t.gamma = true, t.delta = sqlpp::verbatim<sqlpp::integer>("17+4")));
|
||||
db(insert_into(t).set(t.gamma = true, t.delta = sqlpp::null));
|
||||
db(insert_into(t).set(t.gamma = true, t.delta = sqlpp::default_value));
|
||||
db(insert_into(t).set(t.gamma = true, t.delta = sqlpp::tvin(0)));
|
||||
db(insert_into(t).set(t.gamma = true, t.delta = 0));
|
||||
db(insert_into(t).set(values()));
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user