aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/statement.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-03-07 10:21:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-03-07 10:21:09 +0200
commitd2fc34834f0b7660374f78d4409e24a165950c2c (patch)
tree28fd2e0c9b257a5e39d9e29a176472304f51eed1 /odb/oracle/statement.hxx
parent729992078ad2840791d74a7a61113bce0f7c29ff (diff)
Use RAII to free select statement results
Diffstat (limited to 'odb/oracle/statement.hxx')
-rw-r--r--odb/oracle/statement.hxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/odb/oracle/statement.hxx b/odb/oracle/statement.hxx
index f26aa42..ed8f298 100644
--- a/odb/oracle/statement.hxx
+++ b/odb/oracle/statement.hxx
@@ -192,6 +192,19 @@ namespace odb
bool done_;
};
+ struct LIBODB_ORACLE_EXPORT auto_result
+ {
+ explicit auto_result (select_statement& s): s_ (s) {}
+ ~auto_result () {s_.free_result ();}
+
+ private:
+ auto_result (const auto_result&);
+ auto_result& operator= (const auto_result&);
+
+ private:
+ select_statement& s_;
+ };
+
class LIBODB_ORACLE_EXPORT insert_statement: public statement
{
public: