diff options
Diffstat (limited to 'odb/pgsql/connection.hxx')
-rw-r--r-- | odb/pgsql/connection.hxx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/odb/pgsql/connection.hxx b/odb/pgsql/connection.hxx index 6914d5b..2e7679c 100644 --- a/odb/pgsql/connection.hxx +++ b/odb/pgsql/connection.hxx @@ -12,11 +12,13 @@ #include <memory> // std::auto_ptr #include <odb/forward.hxx> +#include <odb/connection.hxx> #include <odb/details/shared-ptr.hxx> #include <odb/pgsql/version.hxx> #include <odb/pgsql/forward.hxx> +#include <odb/pgsql/transaction-impl.hxx> #include <odb/pgsql/pgsql-fwd.hxx> // PGconn #include <odb/pgsql/details/export.hxx> @@ -28,7 +30,10 @@ namespace odb class statement; class statement_cache; - class LIBODB_PGSQL_EXPORT connection: public details::shared_base + class connection; + typedef details::shared_ptr<connection> connection_ptr; + + class LIBODB_PGSQL_EXPORT connection: public odb::connection { public: typedef pgsql::statement_cache statement_cache_type; @@ -46,6 +51,22 @@ namespace odb } public: + virtual transaction_impl* + begin (); + + transaction_impl* + begin_immediate (); + + transaction_impl* + begin_exclusive (); + + public: + using odb::connection::execute; + + virtual unsigned long long + execute (const char* statement, std::size_t length); + + public: PGconn* handle () { |