diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-08-21 16:27:34 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-08-21 16:27:34 +0200 |
commit | ee570de4bd013fd2a4351d33d11539621f00bf57 (patch) | |
tree | 48a7857b2e5fcf799ae4773cbd61252b76ec7512 /odb/pgsql/forward.hxx | |
parent | 6e3ac760696d4ec43138b1aba82426582c767072 (diff) |
Add odb::connection class
This abstract class represents a connection to the database. One can
use it to start a transaction or to execute a native statement out
of a transaction.
Before we had concrete connection classes in the database runtime
libraries (e.g., odb::mysql::connection). Now these classes derive
from odb::connection.
Diffstat (limited to 'odb/pgsql/forward.hxx')
-rw-r--r-- | odb/pgsql/forward.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/odb/pgsql/forward.hxx b/odb/pgsql/forward.hxx index 8b8ac90..046942d 100644 --- a/odb/pgsql/forward.hxx +++ b/odb/pgsql/forward.hxx @@ -8,12 +8,15 @@ #include <odb/pre.hxx> +#include <odb/forward.hxx> + namespace odb { namespace pgsql { class database; class connection; + typedef details::shared_ptr<connection> connection_ptr; class connection_factory; class transaction; class query; @@ -29,6 +32,15 @@ namespace odb template <typename T> class container_statements; } + + namespace details + { + template <> + struct counter_type<pgsql::connection> + { + typedef shared_base counter; + }; + } } #include <odb/post.hxx> |