diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-10-27 12:38:15 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-10-27 12:38:15 +0200 |
commit | e22a5890b984603a0b55a53b95bdf3c8378f9f23 (patch) | |
tree | 09e6a2cfa1e4933f46af0a0c5be84ce98a5a6f21 /common/erase-query | |
parent | 87fd08a98063303d4d97e2bdac7b212ae5248914 (diff) |
Refactor pre-processor directives used to realize Oracle identifier quoting
Diffstat (limited to 'common/erase-query')
-rw-r--r-- | common/erase-query/driver.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/common/erase-query/driver.cxx b/common/erase-query/driver.cxx index a80a252..adbdb76 100644 --- a/common/erase-query/driver.cxx +++ b/common/erase-query/driver.cxx @@ -161,22 +161,18 @@ main (int argc, char* argv[]) t.commit (); } -#ifndef DATABASE_ORACLE { transaction t (db->begin ()); +#ifndef DATABASE_ORACLE assert (db->execute ("SELECT * FROM erase_query_object_v " "WHERE object_id = 1") == 0); - t.commit (); - } #else - { - transaction t (db->begin ()); assert (db->execute ("SELECT * FROM \"erase_query_object_v\" " "WHERE \"object_id\" = 1") == 0); +#endif t.commit (); } -#endif - } +} catch (const odb::exception& e) { cerr << e.what () << endl; |