From e22a5890b984603a0b55a53b95bdf3c8378f9f23 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Thu, 27 Oct 2011 12:38:15 +0200 Subject: Refactor pre-processor directives used to realize Oracle identifier quoting --- common/erase-query/driver.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'common') 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; -- cgit v1.1