Update the documentation for NULL #568

This commit is contained in:
Roland Bock
2024-04-13 08:56:57 +02:00
parent 637afd05ae
commit ac9d0b4417
3 changed files with 32 additions and 76 deletions

View File

@@ -126,7 +126,11 @@ int Interpret(int, char* [])
// select alias
serialize(select(t.alpha).from(t).where(t.beta > "kaesekuchen").as(t.gamma), printer).str();
// Comparison to null
static_assert(sqlpp::can_be_null_t<decltype(t.alpha)>::value, "expected alpha can be null");
static_assert(not sqlpp::can_be_null_t<decltype(f.delta)>::value, "expected delta cannot be null");
serialize(t.alpha.is_null(), printer).str();
serialize(f.delta.is_null(), printer).str();
// join
serialize(t.inner_join(t.as(t.alpha)).on(t.beta == t.as(t.alpha).beta), printer).str();