mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-29 00:38:34 -06:00
Fixed a bunch of missing initializations
This commit is contained in:
@@ -29,10 +29,10 @@
|
||||
|
||||
int insert(int, char**)
|
||||
{
|
||||
MockDb db;
|
||||
MockDb db{};
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature f;
|
||||
const auto p = test::TabPerson{};
|
||||
const auto f = test::TabFeature{};
|
||||
|
||||
db(insert_into(f).set(f.name = "loves c++", f.fatal = false));
|
||||
|
||||
|
||||
@@ -65,9 +65,9 @@ SQLPP_DECLARE_TABLE(
|
||||
|
||||
int ppgen(int, char**)
|
||||
{
|
||||
MockDb db;
|
||||
tab_person::tab_person p;
|
||||
tab_feature::tab_feature f;
|
||||
MockDb db{};
|
||||
const auto p = tab_person::tab_person{};
|
||||
const auto f = tab_feature::tab_feature{};
|
||||
|
||||
db(insert_into(f).set(f.name = "loves c++", f.fatal = false));
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
int remove(int, char**)
|
||||
{
|
||||
MockDb db;
|
||||
MockDb db{};
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature q;
|
||||
const auto p = test::TabPerson{};
|
||||
const auto q = test::TabFeature{};
|
||||
|
||||
db(remove_from(p).using_(p, q).where(p.feature == q.id and q.fatal == true));
|
||||
return 0;
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
MockDb db;
|
||||
MockDb db{};
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature f;
|
||||
const auto p = test::TabPerson{};
|
||||
const auto f = test::TabFeature{};
|
||||
|
||||
db(insert_into(f).set(f.name = "Loves C++", p.fatal = false));
|
||||
|
||||
|
||||
@@ -41,10 +41,12 @@ int select(int, char**)
|
||||
static constexpr bool some_condition = true;
|
||||
static constexpr bool some_other_condition = false;
|
||||
|
||||
MockDb db;
|
||||
MockDb db{};
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature f;
|
||||
const auto p = test::TabPerson{};
|
||||
#if 0
|
||||
const auto f = test::TabFeature{};
|
||||
#endif
|
||||
|
||||
for (const auto& row : db(select(all_of(p)).from(p).where(p.id > 7)))
|
||||
{
|
||||
|
||||
@@ -29,10 +29,9 @@
|
||||
|
||||
int update(int, char**)
|
||||
{
|
||||
MockDb db;
|
||||
MockDb db{};
|
||||
|
||||
test::TabPerson p;
|
||||
// test::TabFeature q;
|
||||
const auto p = test::TabPerson{};
|
||||
|
||||
db(update(p).set(p.feature = 7).where(p.id == 23));
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user