From 5b6649e6f7dd256147b48197a007c23001cef647 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 21 Aug 2011 16:27:34 +0200 Subject: 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. --- odb/forward.hxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'odb/forward.hxx') diff --git a/odb/forward.hxx b/odb/forward.hxx index d51240a..830193c 100644 --- a/odb/forward.hxx +++ b/odb/forward.hxx @@ -13,6 +13,8 @@ namespace odb { class database; + class connection; + typedef details::shared_ptr connection_ptr; class transaction; class session; @@ -22,6 +24,8 @@ namespace odb namespace core { using odb::database; + using odb::connection; + using odb::connection_ptr; using odb::transaction; using odb::session; using odb::result; @@ -51,6 +55,15 @@ namespace odb template struct object_traits; + + namespace details + { + template <> + struct counter_type + { + typedef shared_base counter; + }; + } } #include -- cgit v1.1