From d3689b6cd0b01ea4872cefbe99dbaef95febd64d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 3 Sep 2013 12:49:15 +0200 Subject: Handling of dynamic empty statements as result of versioning --- common/statement/processing/driver.cxx | 17 ++++++++++++++++- common/view/test.hxx | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/statement/processing/driver.cxx b/common/statement/processing/driver.cxx index 34def73..99a9be9 100644 --- a/common/statement/processing/driver.cxx +++ b/common/statement/processing/driver.cxx @@ -264,7 +264,7 @@ main (int, char* argv[]) "SET\n" "[a]=$1\n" "WHERE [id]=$2", - "UPDATE [foo] WHERE [id]=$2", + "", b, 2)); } @@ -385,6 +385,21 @@ main (int, char* argv[]) // SELECT // + // Empty. + // + { + void* b[] = {0, 0, 0}; + assert (select ("SELECT\n" + "[a].[x],\n" + "[t].[y],\n" + "[t].[z]\n" + "FROM [t]\n" + "LEFT JOIN [t1] AS [a] ON [a].[id]=[t].[id]\n" + "WHERE [t].[id]=$1", + "", + b, 3)); + } + // Fast path. // { diff --git a/common/view/test.hxx b/common/view/test.hxx index f9bc8e8..e543466 100644 --- a/common/view/test.hxx +++ b/common/view/test.hxx @@ -394,7 +394,7 @@ struct view6b #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") + 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\"")\ -- cgit v1.1