aboutsummaryrefslogtreecommitdiff
path: root/common/wrapper
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-10-21 08:35:27 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-10-21 13:29:10 +0200
commitf4f07fb437a28d1d9899607e3200d6732e627036 (patch)
tree0838a9d3d546a9121b525d68214490b76fdbe83b /common/wrapper
parent42467152acbac9d4604e448694cf5943c8c194fe (diff)
Remove common_ from all table_prefix arguments in common tests
Diffstat (limited to 'common/wrapper')
-rw-r--r--common/wrapper/makefile2
-rw-r--r--common/wrapper/test.hxx19
2 files changed, 7 insertions, 14 deletions
diff --git a/common/wrapper/makefile b/common/wrapper/makefile
index 7cb4171..a6c82b1 100644
--- a/common/wrapper/makefile
+++ b/common/wrapper/makefile
@@ -36,7 +36,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
---table-prefix cmn_wpr_
+--table-prefix wrapper_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/wrapper/test.hxx b/common/wrapper/test.hxx
index 70bb682..baf6346 100644
--- a/common/wrapper/test.hxx
+++ b/common/wrapper/test.hxx
@@ -39,17 +39,17 @@ struct object
std::auto_ptr<int> num;
+ #pragma db null
std::auto_ptr<std::string> str;
- nullable_string nstr;
- #pragma db id_column ("id")
+ nullable_string nstr;
std::vector<nullable_string> nstrs;
#ifdef HAVE_TR1_MEMORY
#pragma db null
tr1_nullable_string tr1_str;
- #pragma db value_null id_column("id")
+ #pragma db value_null
std::vector<tr1_nullable_string> tr1_strs;
#endif
};
@@ -84,7 +84,6 @@ struct comp2
std::string str;
int num;
- #pragma db id_column("id") index_column("i")
std::vector<std::string> strs;
};
@@ -94,17 +93,14 @@ operator== (const comp2& x, const comp2& y)
return x.str == y.str && x.num == y.num && x.strs == y.strs;
}
-#pragma db object table("comp_obj")
+#pragma db object
struct comp_object
{
#pragma db id auto
unsigned long id_;
std::auto_ptr<comp1> c1; // Wrapped comp value.
-
- #pragma db id_column("id") index_column("i")
std::vector<nullable<comp1> > vc1; // Container of wrapped comp values.
-
std::auto_ptr<comp2> c2; // Container inside wrapped comp value.
};
@@ -114,12 +110,10 @@ struct comp_object
struct comp3: comp2
{
std::auto_ptr<comp1> c1;
-
- #pragma db id_column("id") index_column("i")
std::vector<nullable<comp1> > vc1;
};
-#pragma db object table("comp_obj2")
+#pragma db object
struct comp_object2
{
#pragma db id auto
@@ -136,7 +130,6 @@ struct comp_object2
struct cont_comp
{
int num;
- #pragma db id_column("id")
std::auto_ptr<std::vector<std::string> > strs;
};
@@ -146,7 +139,7 @@ operator== (const cont_comp& x, const cont_comp& y)
return x.num == y.num && *x.strs == *y.strs;
}
-#pragma db object table("cont_obj")
+#pragma db object
struct cont_object
{
#pragma db id auto