aboutsummaryrefslogtreecommitdiff
path: root/common/view
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-10-27 12:36:03 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-10-27 12:36:03 +0200
commit87fd08a98063303d4d97e2bdac7b212ae5248914 (patch)
treefd36e510414dbd3047a5d784cc2be87a95808e8c /common/view
parent9862cef1421bdc08a99c06f08de2dc5396832185 (diff)
Revert to manually quoting Oracle identifiers where necessary
Diffstat (limited to 'common/view')
-rw-r--r--common/view/driver.cxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/common/view/driver.cxx b/common/view/driver.cxx
index b671e46..f6dd613 100644
--- a/common/view/driver.cxx
+++ b/common/view/driver.cxx
@@ -59,7 +59,11 @@ view2_test (const auto_ptr<database>& db)
}
{
- result r (db->query<V> (query::age + " < 31"));
+#ifndef DATABASE_ORACLE
+ result r (db->query<V> ("age < 31"));
+#else
+ result r (db->query<V> ("\"age\" < 31"));
+#endif
iterator i (r.begin ());
assert (i != r.end ());
@@ -87,10 +91,11 @@ view4_test (const auto_ptr<database>& db)
transaction t (db->begin ());
{
- result r (db->query<V> (
- (query::person::age > 30) +
- "ORDER BY " +
- query::person::age));
+#ifndef DATABASE_ORACLE
+ result r (db->query<V> ((query::person::age > 30) + "ORDER BY age"));
+#else
+ result r (db->query<V> ((query::person::age > 30) + "ORDER BY \"age\""));
+#endif
iterator i (r.begin ());
@@ -108,8 +113,7 @@ view4_test (const auto_ptr<database>& db)
{
result r (db->query<V> (
(query::person::age > 30) +
- "ORDER BY " +
- query::person::age));
+ "ORDER BY " + query::person::age));
iterator i (r.begin ());