aboutsummaryrefslogtreecommitdiff
path: root/common/view/test.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-09-10 14:02:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-09-17 12:04:03 +0200
commit22415f5ec7d53fbad4818ac31a42d6e623b8afa9 (patch)
treea35ee9e417ec39be838227b758153d365ae6d38f /common/view/test.hxx
parenta4ebbfe92e3974413410a142d66174d89b7be738 (diff)
Provide quoted versions of view statement
Diffstat (limited to 'common/view/test.hxx')
-rw-r--r--common/view/test.hxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/common/view/test.hxx b/common/view/test.hxx
index e543466..ae30e25 100644
--- a/common/view/test.hxx
+++ b/common/view/test.hxx
@@ -391,14 +391,22 @@ struct view6b
// The same using tables.
//
-#ifndef ODB_DATABASE_ORACLE
-# pragma db view table("t_view_person" = "p") \
- table("t_view_employer_employees" = "ee": "ee.value = p.id") \
- table("t_view_employer" = "e": "\"ee\".\"object_id\" = e.name")
-#else
-# pragma db view table("t_view_person" = "p") \
+#if defined(ODB_DATABASE_ORACLE)
+#pragma db view table("t_view_person" = "p") \
table("t_view_employer_employees" = "ee": "\"ee\".\"value\" = \"p\".\"id\"")\
table("t_view_employer" = "e": "\"ee\".\"object_id\" = \"e\".\"name\"")
+#elif defined(ODB_DATABASE_MSSQL)
+#pragma db view table("t_view_person" = "p") \
+ table("t_view_employer_employees" = "ee": "ee.value = p.id") \
+ table("t_view_employer" = "e": "[ee].[object_id] = e.name")
+#elif defined(ODB_DATABASE_MYSQL)
+#pragma db view table("t_view_person" = "p") \
+ table("t_view_employer_employees" = "ee": "ee.value = p.id") \
+ table("t_view_employer" = "e": "`ee`.`object_id` = e.name")
+#else
+#pragma db view table("t_view_person" = "p") \
+ table("t_view_employer_employees" = "ee": "ee.value = p.id") \
+ table("t_view_employer" = "e": "\"ee\".\"object_id\" = e.name")
#endif
struct view6c
{