aboutsummaryrefslogtreecommitdiff
path: root/common
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
parent42467152acbac9d4604e448694cf5943c8c194fe (diff)
Remove common_ from all table_prefix arguments in common tests
Diffstat (limited to 'common')
-rw-r--r--common/auto/makefile2
-rw-r--r--common/callback/driver.cxx2
-rw-r--r--common/callback/makefile2
-rw-r--r--common/composite/makefile2
-rw-r--r--common/const/makefile2
-rw-r--r--common/container/makefile2
-rw-r--r--common/container/test.hxx6
-rw-r--r--common/ctor/makefile2
-rw-r--r--common/default/driver.cxx2
-rw-r--r--common/default/makefile2
-rw-r--r--common/enum/makefile2
-rw-r--r--common/erase-query/driver.cxx4
-rw-r--r--common/erase-query/makefile2
-rw-r--r--common/inheritance/makefile2
-rw-r--r--common/inverse/makefile2
-rw-r--r--common/lazy-ptr/makefile2
-rw-r--r--common/lifecycle/makefile2
-rw-r--r--common/relationship-query/makefile2
-rw-r--r--common/relationship/makefile2
-rw-r--r--common/schema/makefile2
-rw-r--r--common/template/makefile2
-rw-r--r--common/threads/makefile2
-rw-r--r--common/view/driver.cxx2
-rw-r--r--common/view/makefile2
-rw-r--r--common/view/test.hxx26
-rw-r--r--common/wrapper/makefile2
-rw-r--r--common/wrapper/test.hxx19
27 files changed, 45 insertions, 56 deletions
diff --git a/common/auto/makefile b/common/auto/makefile
index 1880cba..da798c6 100644
--- a/common/auto/makefile
+++ b/common/auto/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_auto_
+--table-prefix auto_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/callback/driver.cxx b/common/callback/driver.cxx
index bc5b4f0..5f2c258 100644
--- a/common/callback/driver.cxx
+++ b/common/callback/driver.cxx
@@ -94,7 +94,7 @@ main (int argc, char* argv[])
transaction t (db->begin ());
result r (db->query<object> (
- (query::id < 3) + "ORDER BY common_callback_object.id"));
+ (query::id < 3) + "ORDER BY callback_object.id"));
for (result::iterator i (r.begin ()); i != r.end (); ++i)
{
diff --git a/common/callback/makefile b/common/callback/makefile
index b24b9ae..6dca289 100644
--- a/common/callback/makefile
+++ b/common/callback/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 \
---generate-query --table-prefix common_callback_
+--generate-query --table-prefix callback_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/composite/makefile b/common/composite/makefile
index 9c4a29d..1813080 100644
--- a/common/composite/makefile
+++ b/common/composite/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 \
---generate-query --table-prefix common_composite_
+--generate-query --table-prefix composite_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/const/makefile b/common/const/makefile
index d8a1410..fd55611 100644
--- a/common/const/makefile
+++ b/common/const/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 \
---generate-query --table-prefix common_const_
+--generate-query --table-prefix const_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/container/makefile b/common/container/makefile
index c1b1124..51dd456 100644
--- a/common/container/makefile
+++ b/common/container/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_ctnr_
+--table-prefix container_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/container/test.hxx b/common/container/test.hxx
index ec392ec..2e267f6 100644
--- a/common/container/test.hxx
+++ b/common/container/test.hxx
@@ -54,7 +54,6 @@ struct cont_comp1
{
// This composite value does not have any columns.
//
- #pragma db id_column("obj_id")
num_vector sv; // Have the name "conflic" with the one in the object.
};
@@ -64,14 +63,11 @@ struct cont_comp2
cont_comp2 (): num (777), str ("ggg") {}
int num;
-
- #pragma db id_column("obj_id")
str_list sl;
-
std::string str;
};
-#pragma db object table("obj")
+#pragma db object
struct object
{
object (): nv (comp1_.sv), sl (comp2_.sl) {}
diff --git a/common/ctor/makefile b/common/ctor/makefile
index 8271074..98e9e3a 100644
--- a/common/ctor/makefile
+++ b/common/ctor/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 \
---generate-query --table-prefix common_ctor_
+--generate-query --table-prefix ctor_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/default/driver.cxx b/common/default/driver.cxx
index a47051c..846619b 100644
--- a/common/default/driver.cxx
+++ b/common/default/driver.cxx
@@ -33,7 +33,7 @@ main (int argc, char* argv[])
//
{
transaction t (db->begin ());
- db->execute ("INSERT INTO common_default_object (obj_id) VALUES (1)");
+ db->execute ("INSERT INTO default_object (obj_id) VALUES (1)");
t.commit ();
}
diff --git a/common/default/makefile b/common/default/makefile
index ce5f9e9..2f66e7a 100644
--- a/common/default/makefile
+++ b/common/default/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 \
---generate-query --table-prefix common_default_
+--generate-query --table-prefix default_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/enum/makefile b/common/enum/makefile
index 03c4915..bbfb1e1 100644
--- a/common/enum/makefile
+++ b/common/enum/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 \
---generate-query --table-prefix common_enum_
+--generate-query --table-prefix enum_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/erase-query/driver.cxx b/common/erase-query/driver.cxx
index baa66f4..0b2d7f5 100644
--- a/common/erase-query/driver.cxx
+++ b/common/erase-query/driver.cxx
@@ -64,7 +64,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
assert (db->erase_query<object> (
- "common_erase_query_object.id < 3") == 2);
+ "erase_query_object.id < 3") == 2);
db->erase_query<object> ();
t.commit ();
}
@@ -162,7 +162,7 @@ main (int argc, char* argv[])
#ifndef DATABASE_MYSQL
{
transaction t (db->begin ());
- assert (db->execute ("SELECT * FROM common_erase_query_object_v "
+ assert (db->execute ("SELECT * FROM erase_query_object_v "
"WHERE object_id = 1") == 0);
t.commit ();
}
diff --git a/common/erase-query/makefile b/common/erase-query/makefile
index 27ac281..4ea31a2 100644
--- a/common/erase-query/makefile
+++ b/common/erase-query/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 \
---generate-query --table-prefix common_erase_query_
+--generate-query --table-prefix erase_query_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/inheritance/makefile b/common/inheritance/makefile
index 8afa961..47ffcaa 100644
--- a/common/inheritance/makefile
+++ b/common/inheritance/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 \
---generate-query --table-prefix common_inheritance_
+--generate-query --table-prefix inheritance_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/inverse/makefile b/common/inverse/makefile
index 08c02e9..6b33f10 100644
--- a/common/inverse/makefile
+++ b/common/inverse/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 \
---generate-query --table-prefix common_inverse_
+--generate-query --table-prefix inverse_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/lazy-ptr/makefile b/common/lazy-ptr/makefile
index 45a6779..d11a87b 100644
--- a/common/lazy-ptr/makefile
+++ b/common/lazy-ptr/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_lazy_ptr_
+--table-prefix lazy_ptr_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/lifecycle/makefile b/common/lifecycle/makefile
index 3fcafce..d1cd9ad 100644
--- a/common/lifecycle/makefile
+++ b/common/lifecycle/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_lifecycle_
+--table-prefix lifecycle_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/relationship-query/makefile b/common/relationship-query/makefile
index f422a8a..2097823 100644
--- a/common/relationship-query/makefile
+++ b/common/relationship-query/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 \
---generate-query --table-prefix common_relationship_query_
+--generate-query --table-prefix relationship_query_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/relationship/makefile b/common/relationship/makefile
index fa00a78..d9f77e6 100644
--- a/common/relationship/makefile
+++ b/common/relationship/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 \
---generate-query --table-prefix common_relationship_
+--generate-query --table-prefix relationship_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/schema/makefile b/common/schema/makefile
index e6e36e9..bc04d16 100644
--- a/common/schema/makefile
+++ b/common/schema/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_schema_
+--table-prefix schema_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/template/makefile b/common/template/makefile
index eec13b5..820fcb3 100644
--- a/common/template/makefile
+++ b/common/template/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 common_template_ #@@ CHANGE THIS
+--table-prefix template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/threads/makefile b/common/threads/makefile
index dd07155..e9aef66 100644
--- a/common/threads/makefile
+++ b/common/threads/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 \
---generate-query --table-prefix common_threads_
+--generate-query --table-prefix threads_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/view/driver.cxx b/common/view/driver.cxx
index a6048dd..8d62830 100644
--- a/common/view/driver.cxx
+++ b/common/view/driver.cxx
@@ -301,7 +301,7 @@ main (int argc, char* argv[])
result r (
db->query<view1c> (
"SELECT first, last, age "
- "FROM common_view_person "
+ "FROM view_person "
"WHERE age < 31 ORDER BY age"));
view1_check (r);
diff --git a/common/view/makefile b/common/view/makefile
index 098baeb..24f60bf 100644
--- a/common/view/makefile
+++ b/common/view/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 \
---generate-query --table-prefix common_view_
+--generate-query --table-prefix view_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/view/test.hxx b/common/view/test.hxx
index 3812662..103439d 100644
--- a/common/view/test.hxx
+++ b/common/view/test.hxx
@@ -130,7 +130,7 @@ struct employer
// Complete suffix query template.
//
-#pragma db view query("SELECT first, last, age FROM common_view_person")
+#pragma db view query("SELECT first, last, age FROM view_person")
struct view1
{
std::string first;
@@ -141,7 +141,7 @@ struct view1
// Complete query.
//
#pragma db view query("SELECT first, last, age " \
- "FROM common_view_person " \
+ "FROM view_person " \
"WHERE age < 31 ORDER BY age")
struct view1a
{
@@ -153,7 +153,7 @@ struct view1a
// Complete placeholder query template.
//
#pragma db view query("SELECT first, last, age " \
- "FROM common_view_person " \
+ "FROM view_person " \
"WHERE age < 31 AND (?) ORDER BY age")
struct view1b
{
@@ -174,7 +174,7 @@ struct view1c
// Assembled SELECT and FROM-lists.
//
-#pragma db view table("common_view_person")
+#pragma db view table("view_person")
struct view1d
{
#pragma db column("first")
@@ -194,7 +194,7 @@ struct view1d
// Complete suffix query.
//
#pragma db view object(person) \
- query("SELECT count(id) FROM common_view_person")
+ query("SELECT count(id) FROM view_person")
struct view2
{
std::size_t count;
@@ -214,7 +214,7 @@ struct view2a
#pragma db view object(person)
struct view2b
{
- #pragma db column("count(common_view_person.id)")
+ #pragma db column("count(view_person.id)")
std::size_t count;
};
@@ -235,7 +235,7 @@ struct view2c
//
#pragma db view object(person = test) \
query("SELECT last, count(last) " \
- "FROM common_view_person " \
+ "FROM view_person " \
"GROUP BY last")
struct view3
{
@@ -265,9 +265,9 @@ struct view3a
//
#pragma db view object(person) object(country = residence) \
query("SELECT first, last, residence.name " \
- "FROM common_view_person " \
- "LEFT JOIN common_view_country AS residence " \
- "ON common_view_person.residence = residence.code")
+ "FROM view_person " \
+ "LEFT JOIN view_country AS residence " \
+ "ON view_person.residence = residence.code")
struct view4
{
std::string first_name;
@@ -347,9 +347,9 @@ struct view6b
// The same using tables.
//
-#pragma db view table("common_view_person" = "p") \
- table("common_view_employer_employees" = "ee": "ee.value = p.id") \
- table("common_view_employer" = "e": "ee.object_id = e.name")
+#pragma db view table("view_person" = "p") \
+ table("view_employer_employees" = "ee": "ee.value = p.id") \
+ table("view_employer" = "e": "ee.object_id = e.name")
struct view6c
{
#pragma db column("p.first")
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