aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/connection.hxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-05-27 15:23:10 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-05-27 15:23:10 +0200
commit88f6ae3ce895a85f47178531cfed3632e5722160 (patch)
tree0b09d1a7ec0939e25c52c65f166cfc105db98ce8 /odb/pgsql/connection.hxx
parentb2a4611002813c7a89849aefc498eee7221708e3 (diff)
Add statement-cache and enable relevant functionality in connection
Diffstat (limited to 'odb/pgsql/connection.hxx')
-rw-r--r--odb/pgsql/connection.hxx57
1 files changed, 7 insertions, 50 deletions
diff --git a/odb/pgsql/connection.hxx b/odb/pgsql/connection.hxx
index 038ce70..6764794 100644
--- a/odb/pgsql/connection.hxx
+++ b/odb/pgsql/connection.hxx
@@ -32,7 +32,7 @@ namespace odb
class LIBODB_PGSQL_EXPORT connection: public details::shared_base
{
public:
- // typedef pgsql::statement_cache statement_cache_type;
+ typedef pgsql::statement_cache statement_cache_type;
typedef pgsql::database database_type;
virtual
@@ -53,65 +53,22 @@ namespace odb
return handle_;
}
- // statement_cache_type&
- // statement_cache ()
- // {
- // return *statement_cache_;
- // }
-
- public:
- // statement*
- // active ()
- // {
- // return active_;
- // }
-
- // void
- // active (statement* s)
- // {
- // active_ = s;
-
- // if (s == 0 && stmt_handles_.size () > 0)
- // free_stmt_handles ();
- // }
-
- // // Cancel and clear the active statement, if any.
- // //
- // void
- // clear ()
- // {
- // if (active_ != 0)
- // clear_ ();
- // }
-
- public:
- // MYSQL_STMT*
- // alloc_stmt_handle ();
-
- // void
- // free_stmt_handle (MYSQL_STMT*);
+ statement_cache_type&
+ statement_cache ()
+ {
+ return *statement_cache_;
+ }
private:
connection (const connection&);
connection& operator= (const connection&);
private:
- // void
- // free_stmt_handles ();
-
- // void
- // clear_ ();
-
- private:
database_type& db_;
PGconn* handle_;
- // statement* active_;
- // std::auto_ptr<statement_cache_type> statement_cache_;
-
- // typedef std::vector<MYSQL_STMT*> stmt_handles;
- // stmt_handles stmt_handles_;
+ std::auto_ptr<statement_cache_type> statement_cache_;
};
}
}