From e00784c2cfb8fa8a33ff6e7812aeac2aff608daf Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Tue, 15 Nov 2011 12:03:08 +0200 Subject: Add call to select_statement::stream_data for container types in Oracle --- odb/relational/oracle/source.cxx | 7 +++++++ odb/relational/source.hxx | 11 +++++++++++ 2 files changed, 18 insertions(+) (limited to 'odb') diff --git a/odb/relational/oracle/source.cxx b/odb/relational/oracle/source.cxx index 1dcda2b..0d4fee0 100644 --- a/odb/relational/oracle/source.cxx +++ b/odb/relational/oracle/source.cxx @@ -909,6 +909,13 @@ namespace relational // interleaving statements. // } + + virtual void + init_value_extra () + { + os << "sts.select_all_statement ().stream_result ();" + << endl; + } }; entry container_traits_; diff --git a/odb/relational/source.hxx b/odb/relational/source.hxx index 7961636..0003021 100644 --- a/odb/relational/source.hxx +++ b/odb/relational/source.hxx @@ -808,6 +808,14 @@ namespace relational os << statement << ".cache ();"; } + // Additional statements that need to be executed follow the call to init + // that initializes the query result image can be made here. + // + virtual void + init_value_extra () + { + } + virtual void traverse_composite (semantics::data_member* m, semantics::class_& c) { @@ -1642,6 +1650,9 @@ namespace relational } } + + init_value_extra (); + // If we are loading an eager pointer, then the call to init // above executes other statements which potentially could // change the image. -- cgit v1.1