aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/forward.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-08-21 16:27:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-08-21 16:27:34 +0200
commite84fa8e3b8defe24a00e14ba046e8e71b438ce0b (patch)
tree2d17fab73f0bbb1a96f365e38ecbd63e033af36f /odb/mysql/forward.hxx
parent47d344f31f7a1a980d807c142e0a36b09db3b1f3 (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/mysql/forward.hxx')
-rw-r--r--odb/mysql/forward.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/odb/mysql/forward.hxx b/odb/mysql/forward.hxx
index 75aeff0..94b175b 100644
--- a/odb/mysql/forward.hxx
+++ b/odb/mysql/forward.hxx
@@ -8,12 +8,15 @@
#include <odb/pre.hxx>
+#include <odb/forward.hxx>
+
namespace odb
{
namespace mysql
{
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<mysql::connection>
+ {
+ typedef shared_base counter;
+ };
+ }
}
#include <odb/post.hxx>