aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-08-24 17:13:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-08-24 17:13:55 +0200
commitff3950866c0f756a5b6f379b9f95f01fff4a9ec7 (patch)
tree1171b1c1ecd9cffc5022d34d8d411846b98adf09
parent1fca8273447e0048941bbfe8ca23466f103c42f3 (diff)
Make tests use unique table prefixes
-rw-r--r--boost/common/optional/makefile5
-rw-r--r--boost/common/smart-ptr/makefile3
-rw-r--r--boost/common/template/makefile3
-rw-r--r--boost/common/unordered/makefile3
-rw-r--r--boost/mysql/date-time/makefile2
-rw-r--r--boost/mysql/template/makefile2
-rw-r--r--boost/pgsql/date-time/makefile2
-rw-r--r--boost/pgsql/template/makefile2
-rw-r--r--boost/sqlite/date-time/makefile2
-rw-r--r--boost/sqlite/template/makefile2
-rw-r--r--common/auto/makefile3
-rw-r--r--common/callback/driver.cxx3
-rw-r--r--common/callback/makefile2
-rw-r--r--common/composite/makefile2
-rw-r--r--common/const/makefile2
-rw-r--r--common/container/makefile3
-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/makefile2
-rw-r--r--common/inheritance/makefile2
-rw-r--r--common/inverse/makefile2
-rw-r--r--common/lazy-ptr/makefile3
-rw-r--r--common/lifecycle/makefile3
-rw-r--r--common/query/makefile3
-rw-r--r--common/relationship/makefile2
-rw-r--r--common/schema/makefile3
-rw-r--r--common/template/makefile3
-rw-r--r--common/threads/makefile2
-rw-r--r--common/wrapper/makefile3
-rw-r--r--mysql/native/driver.cxx20
-rw-r--r--mysql/template/makefile3
-rw-r--r--mysql/truncation/makefile2
-rw-r--r--mysql/types/makefile4
-rw-r--r--pgsql/native/driver.cxx18
-rw-r--r--pgsql/template/makefile3
-rw-r--r--pgsql/truncation/makefile2
-rw-r--r--pgsql/types/makefile4
-rw-r--r--qt/common/containers/makefile3
-rw-r--r--qt/common/smart-ptr/makefile2
-rw-r--r--qt/common/template/makefile3
-rw-r--r--qt/mysql/basic/makefile4
-rw-r--r--qt/mysql/date-time/makefile2
-rw-r--r--qt/mysql/template/makefile2
-rw-r--r--qt/pgsql/basic/makefile4
-rw-r--r--qt/pgsql/date-time/makefile2
-rw-r--r--qt/pgsql/template/makefile2
-rw-r--r--qt/sqlite/basic/makefile4
-rw-r--r--qt/sqlite/date-time/makefile2
-rw-r--r--qt/sqlite/template/makefile2
-rw-r--r--sqlite/native/driver.cxx18
-rw-r--r--sqlite/template/makefile3
-rw-r--r--sqlite/truncation/makefile2
-rw-r--r--sqlite/types/makefile4
55 files changed, 115 insertions, 77 deletions
diff --git a/boost/common/optional/makefile b/boost/common/optional/makefile
index 1b4bf2b..6145a2d 100644
--- a/boost/common/optional/makefile
+++ b/boost/common/optional/makefile
@@ -1,4 +1,4 @@
-# file : boost/common/template/makefile
+# file : boost/common/optional/makefile
# author : Boris Kolpackov <boris@codesynthesis.com>
# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
@@ -45,7 +45,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) \
---profile boost/optional --generate-schema --generate-query
+--profile boost/optional --generate-schema --generate-query \
+--table-prefix boost_common_optional_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_boost.l.cpp-options) \
$(boost.l.cpp-options)
diff --git a/boost/common/smart-ptr/makefile b/boost/common/smart-ptr/makefile
index 45983c9..6d875db 100644
--- a/boost/common/smart-ptr/makefile
+++ b/boost/common/smart-ptr/makefile
@@ -45,7 +45,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) \
---profile boost/smart-ptr --generate-schema
+--profile boost/smart-ptr --generate-schema \
+--table-prefix boost_common_smart_ptr_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_boost.l.cpp-options) \
$(boost.l.cpp-options)
diff --git a/boost/common/template/makefile b/boost/common/template/makefile
index 85000d3..eb2c5f6 100644
--- a/boost/common/template/makefile
+++ b/boost/common/template/makefile
@@ -45,7 +45,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) \
---profile boost/version --generate-schema # CHANGE boost/version
+--profile boost/version --generate-schema \
+--table-prefix boost_common_template_ #@@ CHANGE table prefix, boost/version
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_boost.l.cpp-options) \
$(boost.l.cpp-options)
diff --git a/boost/common/unordered/makefile b/boost/common/unordered/makefile
index f52e2a1..0dd69de 100644
--- a/boost/common/unordered/makefile
+++ b/boost/common/unordered/makefile
@@ -45,7 +45,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) \
---profile boost/unordered --generate-schema
+--profile boost/unordered --generate-schema \
+--table-prefix boost_common_unordered_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_boost.l.cpp-options) \
$(boost.l.cpp-options)
diff --git a/boost/mysql/date-time/makefile b/boost/mysql/date-time/makefile
index e80cf0b..204743e 100644
--- a/boost/mysql/date-time/makefile
+++ b/boost/mysql/date-time/makefile
@@ -49,7 +49,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database mysql --profile boost/date-time \
---generate-schema
+--generate-schema --table-prefix boost_mysql_date_time_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_boost.l.cpp-options) \
$(boost.l.cpp-options)
diff --git a/boost/mysql/template/makefile b/boost/mysql/template/makefile
index 1e030fb..0cba62b 100644
--- a/boost/mysql/template/makefile
+++ b/boost/mysql/template/makefile
@@ -45,7 +45,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database mysql --profile boost \
---generate-schema
+--generate-schema --table-prefix boost_mysql_template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_boost.l.cpp-options) \
$(boost.l.cpp-options)
diff --git a/boost/pgsql/date-time/makefile b/boost/pgsql/date-time/makefile
index 74e2093..3e64e60 100644
--- a/boost/pgsql/date-time/makefile
+++ b/boost/pgsql/date-time/makefile
@@ -49,7 +49,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database pgsql --profile boost/date-time \
---generate-schema
+--generate-schema --table-prefix boost_pgsql_date_time_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_boost.l.cpp-options) \
$(boost.l.cpp-options)
diff --git a/boost/pgsql/template/makefile b/boost/pgsql/template/makefile
index 0d62ab6..986926b 100644
--- a/boost/pgsql/template/makefile
+++ b/boost/pgsql/template/makefile
@@ -49,7 +49,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database pgsql --profile boost \
---generate-schema
+--generate-schema --table-prefix boost_pgsql_template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_boost.l.cpp-options) \
$(boost.l.cpp-options)
diff --git a/boost/sqlite/date-time/makefile b/boost/sqlite/date-time/makefile
index 84f4924..1f87856 100644
--- a/boost/sqlite/date-time/makefile
+++ b/boost/sqlite/date-time/makefile
@@ -49,7 +49,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database sqlite --profile boost/date-time \
---generate-schema
+--generate-schema --table-prefix boost_sqlite_date_time_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_boost.l.cpp-options) \
$(boost.l.cpp-options)
diff --git a/boost/sqlite/template/makefile b/boost/sqlite/template/makefile
index 13f7699..9c107ff 100644
--- a/boost/sqlite/template/makefile
+++ b/boost/sqlite/template/makefile
@@ -49,7 +49,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database sqlite --profile boost \
---generate-schema
+--generate-schema --table-prefix boost_sqlite_template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_boost.l.cpp-options) \
$(boost.l.cpp-options)
diff --git a/common/auto/makefile b/common/auto/makefile
index 7907eb9..1d5b66a 100644
--- a/common/auto/makefile
+++ b/common/auto/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema
+$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+--table-prefix common_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 afd6fb3..bc5b4f0 100644
--- a/common/callback/driver.cxx
+++ b/common/callback/driver.cxx
@@ -93,7 +93,8 @@ main (int argc, char* argv[])
typedef odb::result<object> result;
transaction t (db->begin ());
- result r (db->query<object> ((query::id < 3) + "ORDER BY object.id"));
+ result r (db->query<object> (
+ (query::id < 3) + "ORDER BY common_callback_object.id"));
for (result::iterator i (r.begin ()); i != r.end (); ++i)
{
diff --git a/common/callback/makefile b/common/callback/makefile
index 640e148..b24b9ae 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
+--generate-query --table-prefix common_callback_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/composite/makefile b/common/composite/makefile
index c7b21dc..9c4a29d 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
+--generate-query --table-prefix common_composite_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/const/makefile b/common/const/makefile
index d5a233e..d8a1410 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
+--generate-query --table-prefix common_const_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/container/makefile b/common/container/makefile
index 115adb0..fb14cb0 100644
--- a/common/container/makefile
+++ b/common/container/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema
+$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+--table-prefix common_container_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/ctor/makefile b/common/ctor/makefile
index 9c0c0ee..8271074 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
+--generate-query --table-prefix common_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 32c1923..a47051c 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 object (obj_id) VALUES (1)");
+ db->execute ("INSERT INTO common_default_object (obj_id) VALUES (1)");
t.commit ();
}
diff --git a/common/default/makefile b/common/default/makefile
index fd77d01..ce5f9e9 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
+--generate-query --table-prefix common_default_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/enum/makefile b/common/enum/makefile
index a6b16e2..03c4915 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
+--generate-query --table-prefix common_enum_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/erase-query/makefile b/common/erase-query/makefile
index a31aeab..27ac281 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
+--generate-query --table-prefix common_erase_query_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/inheritance/makefile b/common/inheritance/makefile
index b9715e3..8afa961 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
+--generate-query --table-prefix common_inheritance_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/inverse/makefile b/common/inverse/makefile
index 4e393c8..08c02e9 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
+--generate-query --table-prefix common_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 ee599d2..24e6e43 100644
--- a/common/lazy-ptr/makefile
+++ b/common/lazy-ptr/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema
+$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+--table-prefix common_lazy_ptr_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/lifecycle/makefile b/common/lifecycle/makefile
index 9dc6dd6..a47d6bf 100644
--- a/common/lifecycle/makefile
+++ b/common/lifecycle/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema
+$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+--table-prefix common_lifecycle_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/query/makefile b/common/query/makefile
index c41b1d5..bcdc9c4 100644
--- a/common/query/makefile
+++ b/common/query/makefile
@@ -36,7 +36,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
---generate-query --hxx-prologue '\#include "traits.hxx"'
+--generate-query --hxx-prologue '\#include "traits.hxx"' \
+--table-prefix common_query_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/relationship/makefile b/common/relationship/makefile
index b60f0b2..fa00a78 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
+--generate-query --table-prefix common_relationship_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/schema/makefile b/common/schema/makefile
index 7c67a8b..a0e81eb 100644
--- a/common/schema/makefile
+++ b/common/schema/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema
+$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+--table-prefix common_schema_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/template/makefile b/common/template/makefile
index 34d7faf..eec13b5 100644
--- a/common/template/makefile
+++ b/common/template/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema
+$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+--table-prefix common_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 ddc97b9..dd07155 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
+--generate-query --table-prefix common_threads_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/common/wrapper/makefile b/common/wrapper/makefile
index 3a9b98d..a8477de 100644
--- a/common/wrapper/makefile
+++ b/common/wrapper/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema
+$(gen) $(dist): export odb_options += --database $(db_id) --generate-schema \
+--table-prefix common_wrapper_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/mysql/native/driver.cxx b/mysql/native/driver.cxx
index 437a160..9472cf3 100644
--- a/mysql/native/driver.cxx
+++ b/mysql/native/driver.cxx
@@ -30,8 +30,10 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- db->execute ("DROP TABLE IF EXISTS test");
- db->execute ("CREATE TABLE test (n INT PRIMARY KEY) ENGINE=InnoDB");
+ db->execute ("DROP TABLE IF EXISTS mysql_native_test");
+
+ db->execute ("CREATE TABLE mysql_native_test (n INT PRIMARY KEY) "
+ "ENGINE=InnoDB");
t.commit ();
}
@@ -41,8 +43,11 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- assert (db->execute ("INSERT INTO test (n) VALUES (1)") == 1);
- assert (db->execute ("INSERT INTO test (n) VALUES (2)") == 1);
+ assert (
+ db->execute ("INSERT INTO mysql_native_test (n) VALUES (1)") == 1);
+
+ assert (
+ db->execute ("INSERT INTO mysql_native_test (n) VALUES (2)") == 1);
t.commit ();
}
@@ -52,8 +57,11 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- assert (db->execute ("SELECT n FROM test WHERE n < 3") == 2);
- assert (db->execute ("SELECT n FROM test WHERE n > 3") == 0);
+ assert (
+ db->execute ("SELECT n FROM mysql_native_test WHERE n < 3") == 2);
+
+ assert (
+ db->execute ("SELECT n FROM mysql_native_test WHERE n > 3") == 0);
t.commit ();
}
diff --git a/mysql/template/makefile b/mysql/template/makefile
index 5964b0a..e51c862 100644
--- a/mysql/template/makefile
+++ b/mysql/template/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database mysql --generate-schema
+$(gen) $(dist): export odb_options += --database mysql --generate-schema \
+--table-prefix mysql_template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/mysql/truncation/makefile b/mysql/truncation/makefile
index 9a4f9b1..def31ba 100644
--- a/mysql/truncation/makefile
+++ b/mysql/truncation/makefile
@@ -36,7 +36,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database mysql --generate-query \
---generate-schema
+--generate-schema --table-prefix mysql_truncation_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/mysql/types/makefile b/mysql/types/makefile
index 2b17653..dab5489 100644
--- a/mysql/types/makefile
+++ b/mysql/types/makefile
@@ -36,8 +36,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database mysql --generate-schema \
---generate-query --hxx-prologue '\#include "traits.hxx"'
-
+--generate-query --hxx-prologue '\#include "traits.hxx"' \
+--table-prefix mysql_types_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/pgsql/native/driver.cxx b/pgsql/native/driver.cxx
index 30e707c..7fc63f6 100644
--- a/pgsql/native/driver.cxx
+++ b/pgsql/native/driver.cxx
@@ -29,8 +29,8 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- db->execute ("DROP TABLE IF EXISTS test");
- db->execute ("CREATE TABLE test (n INT PRIMARY KEY)");
+ db->execute ("DROP TABLE IF EXISTS pgsql_native_test");
+ db->execute ("CREATE TABLE pgsql_native_test (n INT PRIMARY KEY)");
t.commit ();
}
@@ -40,8 +40,11 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- assert (db->execute ("INSERT INTO test (n) VALUES (1)") == 1);
- assert (db->execute ("INSERT INTO test (n) VALUES (2)") == 1);
+ assert (
+ db->execute ("INSERT INTO pgsql_native_test (n) VALUES (1)") == 1);
+
+ assert (
+ db->execute ("INSERT INTO pgsql_native_test (n) VALUES (2)") == 1);
t.commit ();
}
@@ -51,8 +54,11 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- assert (db->execute ("SELECT n FROM test WHERE n < 3") == 2);
- assert (db->execute ("SELECT n FROM test WHERE n > 3") == 0);
+ assert (
+ db->execute ("SELECT n FROM pgsql_native_test WHERE n < 3") == 2);
+
+ assert (
+ db->execute ("SELECT n FROM pgsql_native_test WHERE n > 3") == 0);
t.commit ();
}
diff --git a/pgsql/template/makefile b/pgsql/template/makefile
index 518cab0..bf6b9c3 100644
--- a/pgsql/template/makefile
+++ b/pgsql/template/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database pgsql --generate-schema
+$(gen) $(dist): export odb_options += --database pgsql --generate-schema \
+--table-prefix pgsql_template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/pgsql/truncation/makefile b/pgsql/truncation/makefile
index a94639d..6bfe835 100644
--- a/pgsql/truncation/makefile
+++ b/pgsql/truncation/makefile
@@ -36,7 +36,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database pgsql --generate-query \
---generate-schema
+--generate-schema --table-prefix pgsql_truncation_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/pgsql/types/makefile b/pgsql/types/makefile
index bdc00ea..0ba6bec 100644
--- a/pgsql/types/makefile
+++ b/pgsql/types/makefile
@@ -36,8 +36,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database pgsql --generate-schema \
---generate-query --cxx-prologue '\#include "traits.hxx"'
-
+--generate-query --cxx-prologue '\#include "traits.hxx"' \
+--table-prefix pgsql_types_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/qt/common/containers/makefile b/qt/common/containers/makefile
index 85aec25..f675c37 100644
--- a/qt/common/containers/makefile
+++ b/qt/common/containers/makefile
@@ -45,7 +45,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) \
---profile qt/containers --profile qt/basic --generate-schema
+--profile qt/containers --profile qt/basic --generate-schema \
+--table-prefix qt_common_containers_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options) \
$(qt_core.l.cpp-options)
diff --git a/qt/common/smart-ptr/makefile b/qt/common/smart-ptr/makefile
index a7742f2..21ba8b8 100644
--- a/qt/common/smart-ptr/makefile
+++ b/qt/common/smart-ptr/makefile
@@ -45,7 +45,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) \
---profile qt/smart-ptr --generate-schema
+--profile qt/smart-ptr --generate-schema --table-prefix qt_common_smart_ptr_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options) \
$(qt_core.l.cpp-options)
diff --git a/qt/common/template/makefile b/qt/common/template/makefile
index e3f52f0..d0cb3d8 100644
--- a/qt/common/template/makefile
+++ b/qt/common/template/makefile
@@ -45,7 +45,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) \
---profile qt/version --generate-schema # CHANGE qt/version
+--profile qt/version --generate-schema \
+--table-prefix qt_common_template_ #@@ CHANGE table prefix, qt/version
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options) \
$(qt_core.l.cpp-options)
diff --git a/qt/mysql/basic/makefile b/qt/mysql/basic/makefile
index 6d48f0c..dcfac13 100644
--- a/qt/mysql/basic/makefile
+++ b/qt/mysql/basic/makefile
@@ -1,4 +1,4 @@
-# file : qt/mysql/date-time/makefile
+# file : qt/mysql/basic/makefile
# author : Constantin Michael <constantin@codesynthesis.com>
# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
@@ -45,7 +45,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database mysql --profile qt/basic \
---generate-schema
+--generate-schema --table-prefix qt_mysql_basic_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options) \
$(qt_core.l.cpp-options)
diff --git a/qt/mysql/date-time/makefile b/qt/mysql/date-time/makefile
index ca8e79c..ef50f46 100644
--- a/qt/mysql/date-time/makefile
+++ b/qt/mysql/date-time/makefile
@@ -45,7 +45,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database mysql --profile qt/date-time \
---generate-schema
+--generate-schema --table-prefix qt_mysql_date_time_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options) \
$(qt_core.l.cpp-options)
diff --git a/qt/mysql/template/makefile b/qt/mysql/template/makefile
index a76f0cc..aa5381d 100644
--- a/qt/mysql/template/makefile
+++ b/qt/mysql/template/makefile
@@ -40,7 +40,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database mysql --profile qt \
---generate-schema
+--generate-schema --table-prefix qt_mysql_template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options)
diff --git a/qt/pgsql/basic/makefile b/qt/pgsql/basic/makefile
index ef1057f..977cdca 100644
--- a/qt/pgsql/basic/makefile
+++ b/qt/pgsql/basic/makefile
@@ -1,4 +1,4 @@
-# file : qt/pgsql/date-time/makefile
+# file : qt/pgsql/basic/makefile
# author : Constantin Michael <constantin@codesynthesis.com>
# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
@@ -45,7 +45,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database pgsql --profile qt/basic \
---generate-schema
+--generate-schema --table-prefix qt_pgsql_basic_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options) \
$(qt_core.l.cpp-options)
diff --git a/qt/pgsql/date-time/makefile b/qt/pgsql/date-time/makefile
index 9d63918..51f8375 100644
--- a/qt/pgsql/date-time/makefile
+++ b/qt/pgsql/date-time/makefile
@@ -45,7 +45,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database pgsql --profile qt/date-time \
---generate-schema
+--generate-schema --table-prefix qt_pgsql_date_time_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options) \
$(qt_core.l.cpp-options)
diff --git a/qt/pgsql/template/makefile b/qt/pgsql/template/makefile
index 9905b4c..c599c3e 100644
--- a/qt/pgsql/template/makefile
+++ b/qt/pgsql/template/makefile
@@ -40,7 +40,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database pgsql --profile qt \
---generate-schema
+--generate-schema --table-prefix qt_pgsql_template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options)
diff --git a/qt/sqlite/basic/makefile b/qt/sqlite/basic/makefile
index e1b1af0..aeede6a 100644
--- a/qt/sqlite/basic/makefile
+++ b/qt/sqlite/basic/makefile
@@ -1,4 +1,4 @@
-# file : qt/sqlite/date-time/makefile
+# file : qt/sqlite/basic/makefile
# author : Constantin Michael <constantin@codesynthesis.com>
# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
@@ -45,7 +45,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database sqlite --profile qt/basic \
---generate-schema
+--generate-schema --table-prefix qt_sqlite_basic_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options) \
$(qt_core.l.cpp-options)
diff --git a/qt/sqlite/date-time/makefile b/qt/sqlite/date-time/makefile
index 261200a..a105859 100644
--- a/qt/sqlite/date-time/makefile
+++ b/qt/sqlite/date-time/makefile
@@ -45,7 +45,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database sqlite --profile qt/date-time \
---generate-schema
+--generate-schema --table-prefix qt_sqlite_date_time_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options) \
$(qt_core.l.cpp-options)
diff --git a/qt/sqlite/template/makefile b/qt/sqlite/template/makefile
index b19b8ef..b86ba6e 100644
--- a/qt/sqlite/template/makefile
+++ b/qt/sqlite/template/makefile
@@ -40,7 +40,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database sqlite --profile qt \
---generate-schema
+--generate-schema --table-prefix qt_sqlite_template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options) $(odb_qt.l.cpp-options)
diff --git a/sqlite/native/driver.cxx b/sqlite/native/driver.cxx
index 73e0450..7f1d319 100644
--- a/sqlite/native/driver.cxx
+++ b/sqlite/native/driver.cxx
@@ -30,8 +30,8 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- db->execute ("DROP TABLE IF EXISTS test");
- db->execute ("CREATE TABLE test (n INTEGER PRIMARY KEY)");
+ db->execute ("DROP TABLE IF EXISTS sqlitex_native_test");
+ db->execute ("CREATE TABLE sqlitex_native_test (n INTEGER PRIMARY KEY)");
t.commit ();
}
@@ -41,8 +41,11 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- assert (db->execute ("INSERT INTO test (n) VALUES (1)") == 1);
- assert (db->execute ("INSERT INTO test (n) VALUES (2)") == 1);
+ assert (
+ db->execute ("INSERT INTO sqlitex_native_test (n) VALUES (1)") == 1);
+
+ assert (
+ db->execute ("INSERT INTO sqlitex_native_test (n) VALUES (2)") == 1);
t.commit ();
}
@@ -52,8 +55,11 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
- assert (db->execute ("SELECT n FROM test WHERE n < 3") == 2);
- assert (db->execute ("SELECT n FROM test WHERE n > 3") == 0);
+ assert (
+ db->execute ("SELECT n FROM sqlitex_native_test WHERE n < 3") == 2);
+
+ assert (
+ db->execute ("SELECT n FROM sqlitex_native_test WHERE n > 3") == 0);
t.commit ();
}
diff --git a/sqlite/template/makefile b/sqlite/template/makefile
index bf2f178..bb63095 100644
--- a/sqlite/template/makefile
+++ b/sqlite/template/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database sqlite --generate-schema
+$(gen) $(dist): export odb_options += --database sqlite --generate-schema \
+--table-prefix sqlitex_template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/sqlite/truncation/makefile b/sqlite/truncation/makefile
index 8b00a1c..33c7f46 100644
--- a/sqlite/truncation/makefile
+++ b/sqlite/truncation/makefile
@@ -36,7 +36,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database sqlite --generate-query \
---generate-schema
+--generate-schema --table-prefix sqlitex_truncation_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/sqlite/types/makefile b/sqlite/types/makefile
index 7836a39..bf6235f 100644
--- a/sqlite/types/makefile
+++ b/sqlite/types/makefile
@@ -36,8 +36,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database sqlite --generate-schema \
---generate-query --cxx-prologue '\#include "traits.hxx"'
-
+--generate-query --cxx-prologue '\#include "traits.hxx"' \
+--table-prefix sqlitex_types_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)