aboutsummaryrefslogtreecommitdiff
path: root/common/view
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/view
parent42467152acbac9d4604e448694cf5943c8c194fe (diff)
Remove common_ from all table_prefix arguments in common tests
Diffstat (limited to 'common/view')
-rw-r--r--common/view/driver.cxx2
-rw-r--r--common/view/makefile2
-rw-r--r--common/view/test.hxx26
3 files changed, 15 insertions, 15 deletions
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")