aboutsummaryrefslogtreecommitdiff
path: root/common/callback
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-10-26 10:05:25 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-10-26 17:15:52 +0200
commit1f14eecfed1303d5d7bf5febcba29e06c2d19d9e (patch)
tree08e5cdfc1392df9519d9079b0abac0d3a6c3f7b8 /common/callback
parent82c04419fe56ef491c40a02c316338bfc380787f (diff)
Quote schema object identifiers for Oracle where necessary
Oracle converts all alphabetical characters in unquoted schema object identifiers to uppercase. This behaviour cannot be disabled.
Diffstat (limited to 'common/callback')
-rw-r--r--common/callback/driver.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/callback/driver.cxx b/common/callback/driver.cxx
index 5f2c258..76dbda4 100644
--- a/common/callback/driver.cxx
+++ b/common/callback/driver.cxx
@@ -14,6 +14,7 @@
#include <odb/transaction.hxx>
#include <common/common.hxx>
+#include <common/config.hxx> // DATABASE_XXX
#include "test.hxx"
#include "test-odb.hxx"
@@ -93,8 +94,14 @@ main (int argc, char* argv[])
typedef odb::result<object> result;
transaction t (db->begin ());
+
+#ifndef DATABASE_ORACLE
result r (db->query<object> (
(query::id < 3) + "ORDER BY callback_object.id"));
+#else
+ result r (db->query<object> (
+ (query::id < 3) + "ORDER BY \"callback_object\".\"id\""));
+#endif
for (result::iterator i (r.begin ()); i != r.end (); ++i)
{