From 9cb039e2574f30ab64a5b934ba368eee6193964a Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Tue, 11 Oct 2011 08:14:06 +0200 Subject: Enable statement cache in connection --- odb/oracle/connection.cxx | 15 ++++++++------- odb/oracle/connection.hxx | 12 ++++++------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/odb/oracle/connection.cxx b/odb/oracle/connection.cxx index 12e8ea0..bc77dfc 100644 --- a/odb/oracle/connection.cxx +++ b/odb/oracle/connection.cxx @@ -13,8 +13,7 @@ #include #include #include - -// #include +#include using namespace std; @@ -25,8 +24,9 @@ namespace odb connection:: connection (database_type& db) : odb::connection (db), - db_ (db) - // statement_cache_ (new statement_cache_type (*this)) + db_ (db), + statement_cache_ (new statement_cache_type (*this)), + lob_buffer_ (0) { sword r (0); @@ -108,8 +108,9 @@ namespace odb connection:: connection (database_type& db, OCISvcCtx* handle) : odb::connection (db), - db_ (db) - // statement_cache_ (new statement_cache_type (*this)) + db_ (db), + statement_cache_ (new statement_cache_type (*this)), + lob_buffer_ (0) { sword r (0); @@ -135,7 +136,7 @@ namespace odb { // Deallocate prepared statements before we close the connection. // - // statement_cache_.reset (); + statement_cache_.reset (); } transaction_impl* connection:: diff --git a/odb/oracle/connection.hxx b/odb/oracle/connection.hxx index 8d0e447..1440c25 100644 --- a/odb/oracle/connection.hxx +++ b/odb/oracle/connection.hxx @@ -75,11 +75,11 @@ namespace odb return error_; } - // statement_cache_type& - // statement_cache () - // { - // return *statement_cache_; - // } + statement_cache_type& + statement_cache () + { + return *statement_cache_; + } private: connection (const connection&); @@ -95,7 +95,7 @@ namespace odb auto_handle handle_; - // std::auto_ptr statement_cache_; + std::auto_ptr statement_cache_; }; } } -- cgit v1.1