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:
Roland Bock
2021-07-11 12:47:13 +02:00
parent 35c2b9ec04
commit db0295a9d0
22 changed files with 14 additions and 286 deletions

View File

@@ -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;