aboutsummaryrefslogtreecommitdiff
path: root/libcommon/common/common.cxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-09-02 14:15:46 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-10-21 11:47:16 +0200
commit84f9ce9150abfb5f4424d8e94fefa932af3172fa (patch)
tree5205a6d141793c190fe1e0cacda2b5f1bac6b06f /libcommon/common/common.cxx
parent7e70aa043b7a2482590b0e5459284d2c848eb474 (diff)
Add infrastructure for oracle development testing and implement native test
Diffstat (limited to 'libcommon/common/common.cxx')
-rw-r--r--libcommon/common/common.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/libcommon/common/common.cxx b/libcommon/common/common.cxx
index 384d945..d09c14b 100644
--- a/libcommon/common/common.cxx
+++ b/libcommon/common/common.cxx
@@ -22,6 +22,9 @@
#elif defined(DATABASE_PGSQL)
# include <odb/pgsql/database.hxx>
# include <odb/pgsql/connection-factory.hxx>
+#elif defined(DATABASE_ORACLE)
+# include <odb/oracle/database.hxx>
+# include <odb/oracle/connection-factory.hxx>
#else
# error unknown database
#endif
@@ -37,6 +40,8 @@ namespace mysql = odb::mysql;
namespace sqlite = odb::sqlite;
#elif defined(DATABASE_PGSQL)
namespace pgsql = odb::pgsql;
+#elif defined(DATABASE_ORACLE)
+namespace oracle = odb::oracle;
#endif
auto_ptr<database>
@@ -60,6 +65,8 @@ create_database (int& argc,
sqlite::database::print_usage (cerr);
#elif defined(DATABASE_PGSQL)
pgsql::database::print_usage (cerr);
+#elif defined(DATABASE_ORAClE)
+ oracle::database::print_usage (cerr);
#endif
exit (0);
@@ -107,6 +114,13 @@ create_database (int& argc,
f.reset (new pgsql::connection_pool_factory (max_connections));
db.reset (new pgsql::database (argc, argv, false, "", f));
+#elif defined(DATABASE_ORACLE)
+ auto_ptr<oracle::connection_factory> f;
+
+ if (max_connections != 0)
+ f.reset (new oracle::connection_pool_factory (max_connections));
+
+ db.reset (new oracle::database (argc, argv, false, 0, f));
#endif
return db;