aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
{