mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-06 05:00:37 -06:00
Reformatted using clang-format
Please use clang-format before submitting code, e.g via the pre-commit supplied in the repo (thanks AndiDog)
This commit is contained in:
@@ -32,7 +32,7 @@ MockDb db;
|
||||
|
||||
int main()
|
||||
{
|
||||
test::TabBar t;
|
||||
test::TabBar t;
|
||||
|
||||
count(count(t.alpha));
|
||||
count(count(t.alpha));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ MockDb db;
|
||||
|
||||
int main()
|
||||
{
|
||||
test::TabBar t;
|
||||
test::TabBar t;
|
||||
|
||||
max(max(t.alpha));
|
||||
max(max(t.alpha));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ MockDb db;
|
||||
|
||||
int main()
|
||||
{
|
||||
test::TabBar t;
|
||||
test::TabBar t;
|
||||
|
||||
insert_into(t).set(t.alpha = 7, t.gamma = false, t.beta = "alpha must not be set");
|
||||
insert_into(t).set(t.alpha = 7, t.gamma = false, t.beta = "alpha must not be set");
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ MockDb db;
|
||||
|
||||
int main()
|
||||
{
|
||||
test::TabBar t;
|
||||
test::TabBar t;
|
||||
|
||||
update(t).set(t.alpha = 7, t.gamma = false, t.beta = "alpha must not be set");
|
||||
update(t).set(t.alpha = 7, t.gamma = false, t.beta = "alpha must not be set");
|
||||
}
|
||||
|
||||
@@ -27,22 +27,23 @@
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/sqlpp11.h>
|
||||
|
||||
EnforceDb edb {};
|
||||
EnforceDb edb{};
|
||||
|
||||
int main()
|
||||
{
|
||||
test::TabBar t;
|
||||
test::TabBar t;
|
||||
|
||||
static_assert(sqlpp::can_be_null_t<decltype(t.alpha)>::value, "t.alpha can be null");
|
||||
static_assert(not sqlpp::null_is_trivial_value_t<decltype(t.alpha)>::value, "t.alpha does not say null_is_trivial");
|
||||
static_assert(sqlpp::can_be_null_t<decltype(t.alpha)>::value, "t.alpha can be null");
|
||||
static_assert(not sqlpp::null_is_trivial_value_t<decltype(t.alpha)>::value, "t.alpha does not say null_is_trivial");
|
||||
|
||||
for (const auto& row : edb(select(all_of(t)).from(t).where(true)))
|
||||
{
|
||||
static_assert(sqlpp::can_be_null_t<decltype(row.alpha)>::value, "row.alpha can be null");
|
||||
static_assert(not sqlpp::null_is_trivial_value_t<decltype(row.alpha)>::value, "row.alpha does not interpret null_is_trivial");
|
||||
for (const auto& row : edb(select(all_of(t)).from(t).where(true)))
|
||||
{
|
||||
static_assert(sqlpp::can_be_null_t<decltype(row.alpha)>::value, "row.alpha can be null");
|
||||
static_assert(not sqlpp::null_is_trivial_value_t<decltype(row.alpha)>::value,
|
||||
"row.alpha does not interpret null_is_trivial");
|
||||
|
||||
int i = row.alpha;
|
||||
}
|
||||
int i = row.alpha;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ MockDb db;
|
||||
|
||||
int main()
|
||||
{
|
||||
test::TabBar t;
|
||||
test::TabBar t;
|
||||
|
||||
insert_into(t).set(t.beta = "need also to insert gamma");
|
||||
insert_into(t).set(t.beta = "need also to insert gamma");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user