diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-06-21 10:39:59 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-06-21 10:39:59 +0200 |
commit | 6cd8b9f561b912f264ba4f723845935c40a3cb95 (patch) | |
tree | 5983e0af3d2ee621242ca6707a58c89b9914d8f0 /common/default/driver.cxx | |
parent | 236cd9bb1dd022e64d690c9b0080d1a15c5f61c7 (diff) |
Add support for running tests in dynamic multi-database mode
Only possible in the development build system at this stage.
Diffstat (limited to 'common/default/driver.cxx')
-rw-r--r-- | common/default/driver.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/common/default/driver.cxx b/common/default/driver.cxx index 515cb38..56f9a3d 100644 --- a/common/default/driver.cxx +++ b/common/default/driver.cxx @@ -13,7 +13,6 @@ #include <odb/transaction.hxx> #include <common/common.hxx> -#include <common/config.hxx> // DATABASE_XXX #include "test.hxx" #include "test-odb.hxx" @@ -34,11 +33,11 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); -#ifndef DATABASE_ORACLE - db->execute ("INSERT INTO default_object (obj_id) VALUES (1)"); -#else - db->execute ("INSERT INTO \"default_object\" (\"obj_id\") VALUES (1)"); -#endif + if (db->id () != odb::id_oracle) + db->execute ("INSERT INTO default_object (obj_id) VALUES (1)"); + else + db->execute ("INSERT INTO \"default_object\" (\"obj_id\") VALUES (1)"); + t.commit (); } |