From 3d1969a43fce72dd50044c5eada38557f3f200bd Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 8 Oct 2012 16:09:08 +0200 Subject: Ground work for multi-database support All generated code now includes database id. The database-specific database class interface has been updated to include all the database operations. The database-specific tests now use this interface. --- oracle/custom/driver.cxx | 5 +++-- oracle/database/driver.cxx | 3 ++- oracle/native/driver.cxx | 5 +++-- oracle/template/driver.cxx | 5 +++-- oracle/types/driver.cxx | 9 +++++---- 5 files changed, 16 insertions(+), 11 deletions(-) (limited to 'oracle') diff --git a/oracle/custom/driver.cxx b/oracle/custom/driver.cxx index 2425b29..16b81da 100644 --- a/oracle/custom/driver.cxx +++ b/oracle/custom/driver.cxx @@ -18,14 +18,15 @@ #include "test-odb.hxx" using namespace std; -using namespace odb::core; +namespace oracle = odb::oracle; +using namespace oracle; int main (int argc, char* argv[]) { try { - auto_ptr db (create_database (argc, argv)); + auto_ptr db (create_specific_database (argc, argv)); object o (1); o.iv.push_back (123); diff --git a/oracle/database/driver.cxx b/oracle/database/driver.cxx index d6846b6..53dda69 100644 --- a/oracle/database/driver.cxx +++ b/oracle/database/driver.cxx @@ -7,7 +7,8 @@ #include -using namespace odb::oracle; +namespace oracle = odb::oracle; +using namespace oracle; int main (int argc, char* argv[]) diff --git a/oracle/native/driver.cxx b/oracle/native/driver.cxx index 0e90ff0..9530692 100644 --- a/oracle/native/driver.cxx +++ b/oracle/native/driver.cxx @@ -15,14 +15,15 @@ #include using namespace std; -using namespace odb::core; +namespace oracle = odb::oracle; +using namespace oracle; int main (int argc, char* argv[]) { try { - auto_ptr db (create_database (argc, argv)); + auto_ptr db (create_specific_database (argc, argv)); // Create the database schema. // diff --git a/oracle/template/driver.cxx b/oracle/template/driver.cxx index 44b4f83..35a2b39 100644 --- a/oracle/template/driver.cxx +++ b/oracle/template/driver.cxx @@ -18,14 +18,15 @@ #include "test-odb.hxx" using namespace std; -using namespace odb::core; +namespace oracle = odb::oracle; +using namespace oracle; int main (int argc, char* argv[]) { try { - auto_ptr db (create_database (argc, argv)); + auto_ptr db (create_specific_database (argc, argv)); // // diff --git a/oracle/types/driver.cxx b/oracle/types/driver.cxx index 7c3e6bd..be6251c 100644 --- a/oracle/types/driver.cxx +++ b/oracle/types/driver.cxx @@ -18,7 +18,8 @@ #include "test-odb.hxx" using namespace std; -using namespace odb::core; +namespace oracle = odb::oracle; +using namespace oracle; int main (int argc, char* argv[]) @@ -28,7 +29,7 @@ main (int argc, char* argv[]) // Create an Oracle database instance, setting both the client database // and national character set to UTF-8. // - auto_ptr db (create_database (argc, argv)); + auto_ptr db (create_specific_database (argc, argv)); object o (1); @@ -206,7 +207,7 @@ main (int argc, char* argv[]) // Test image copying with LOB data. // { - typedef odb::query query; + typedef oracle::query query; typedef odb::result result; transaction t (db->begin ()); @@ -235,7 +236,7 @@ main (int argc, char* argv[]) // Test descriptor management in TIMESTAMP and INTERVAL images. // { - typedef odb::query query; + typedef oracle::query query; typedef odb::result result; query q (query::timestamp == o.timestamp_ && -- cgit v1.1