mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-05-02 17:09:46 -05:00
Fixed a bunch of shadowing warnings issued by g++
A bit over the top in some places, I think
This commit is contained in:
+5
-5
@@ -27,13 +27,13 @@
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/sqlpp11.h>
|
||||
|
||||
MockDb db;
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature f;
|
||||
|
||||
int main()
|
||||
{
|
||||
MockDb db;
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature f;
|
||||
|
||||
db(insert_into(f).set(f.name = "loves c++", f.fatal = false));
|
||||
|
||||
//db(insert_into(f).set(f.nahme = "loves c++", f.fatal = false));
|
||||
|
||||
+2
-1
@@ -61,7 +61,8 @@ SQLPP_DECLARE_TABLE(
|
||||
(fatal, bool , SQLPP_NOT_NULL )
|
||||
)
|
||||
|
||||
int main() {
|
||||
int main()
|
||||
{
|
||||
MockDb db;
|
||||
tab_person::tab_person p;
|
||||
tab_feature::tab_feature f;
|
||||
|
||||
+5
-5
@@ -27,13 +27,13 @@
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/sqlpp11.h>
|
||||
|
||||
MockDb db;
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature q;
|
||||
|
||||
int main()
|
||||
{
|
||||
MockDb db;
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature q;
|
||||
|
||||
db(remove_from(p)
|
||||
.using_(p, q)
|
||||
.where(p.feature == q.id and q.fatal == true));
|
||||
|
||||
+5
-5
@@ -27,13 +27,13 @@
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/sqlpp11.h>
|
||||
|
||||
MockDb db;
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature f;
|
||||
|
||||
int main()
|
||||
{
|
||||
MockDb db;
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature f;
|
||||
|
||||
db(insert_into(f).set(f.name = "Loves C++", p.fatal = false));
|
||||
|
||||
db(insert_into(f).set(p.name = "Roland", p.feature = 1));
|
||||
|
||||
+8
-8
@@ -34,18 +34,18 @@
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/sqlpp11.h>
|
||||
|
||||
static constexpr bool some_condition = true;
|
||||
static constexpr bool some_other_condition = false;
|
||||
|
||||
SQLPP_ALIAS_PROVIDER(cheesecake)
|
||||
|
||||
MockDb db;
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature f;
|
||||
|
||||
int main()
|
||||
{
|
||||
static constexpr bool some_condition = true;
|
||||
static constexpr bool some_other_condition = false;
|
||||
|
||||
MockDb db;
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature f;
|
||||
|
||||
for (const auto& row : db(select(all_of(p)).from(p).where(p.id > 7)))
|
||||
{
|
||||
int64_t id = row.id;
|
||||
|
||||
+5
-5
@@ -27,12 +27,12 @@
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/sqlpp11.h>
|
||||
|
||||
MockDb db;
|
||||
|
||||
test::TabPerson p;
|
||||
test::TabFeature q;
|
||||
|
||||
int main()
|
||||
{
|
||||
MockDb db;
|
||||
|
||||
test::TabPerson p;
|
||||
//test::TabFeature q;
|
||||
|
||||
db(update(p).set(p.feature = 7).where(p.id == 23));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user