aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/transaction-impl.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-06-04 16:45:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-06-04 16:45:36 +0200
commitfcfe083c7a6d12eb4b6b88eea4a5ebbfc4d36995 (patch)
treeba60af2863d425e8be78749558c73910ab2f921d /odb/mysql/transaction-impl.hxx
parent073918a2f4bff3a6f12cfd722db50e3fb0a6db0d (diff)
Initial implementation
Diffstat (limited to 'odb/mysql/transaction-impl.hxx')
-rw-r--r--odb/mysql/transaction-impl.hxx50
1 files changed, 50 insertions, 0 deletions
diff --git a/odb/mysql/transaction-impl.hxx b/odb/mysql/transaction-impl.hxx
new file mode 100644
index 0000000..1e611b8
--- /dev/null
+++ b/odb/mysql/transaction-impl.hxx
@@ -0,0 +1,50 @@
+// file : odb/mysql/transaction-impl.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_MYSQL_TRANSACTION_IMPL_HXX
+#define ODB_MYSQL_TRANSACTION_IMPL_HXX
+
+#include <odb/shared-ptr.hxx>
+#include <odb/transaction.hxx>
+
+#include <odb/mysql/forward.hxx>
+
+namespace odb
+{
+ namespace mysql
+ {
+ class transaction_impl: public odb::transaction_impl
+ {
+ protected:
+ friend class database;
+ friend class transaction;
+
+ typedef mysql::database database_type;
+ typedef mysql::connection connection_type;
+
+ transaction_impl (database_type&);
+ transaction_impl (database_type&, session_type&);
+
+ virtual
+ ~transaction_impl ();
+
+ virtual void
+ commit ();
+
+ virtual void
+ rollback ();
+
+ connection_type&
+ connection ();
+
+ private:
+ shared_ptr<connection_type> connection_;
+ };
+ }
+}
+
+#include <odb/mysql/transaction-impl.ixx>
+
+#endif // ODB_MYSQL_TRANSACTION_IMPL_HXX