diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-08-28 16:07:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-08-28 16:07:38 +0200 |
commit | b405fdd235a7dcb40423229af033abd4687c72b2 (patch) | |
tree | 6c0ba8a9732d5891990d302b98b4c44f924a78af /odb/pgsql/connection.hxx | |
parent | ae4b24d8d83a46dce969fd049a480bcaaeb0ad83 (diff) |
Add support for creating connection from existing handle
This will allow for custom connection establishment and configuration.
Diffstat (limited to 'odb/pgsql/connection.hxx')
-rw-r--r-- | odb/pgsql/connection.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/odb/pgsql/connection.hxx b/odb/pgsql/connection.hxx index a44b328..063f8d4 100644 --- a/odb/pgsql/connection.hxx +++ b/odb/pgsql/connection.hxx @@ -43,6 +43,7 @@ namespace odb ~connection (); connection (database_type&); + connection (database_type&, PGconn* handle); database_type& database () @@ -78,6 +79,10 @@ namespace odb connection& operator= (const connection&); private: + void + init (); + + private: database_type& db_; PGconn* handle_; |