From 78e81069aadc609aee1e4b8137516d9cfce47b0a Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Wed, 11 May 2011 10:58:27 +0200 Subject: Add transaction implementation --- odb/pgsql/transaction.ixx | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 odb/pgsql/transaction.ixx (limited to 'odb/pgsql/transaction.ixx') diff --git a/odb/pgsql/transaction.ixx b/odb/pgsql/transaction.ixx new file mode 100644 index 0000000..d109e97 --- /dev/null +++ b/odb/pgsql/transaction.ixx @@ -0,0 +1,41 @@ +// file : odb/pgsql/transaction.ixx +// author : Constantin Michael +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include +#include + +namespace odb +{ + namespace pgsql + { + inline transaction:: + transaction (transaction_impl* impl) + : odb::transaction (impl) + { + } + + inline transaction_impl& transaction:: + implementation () + { + // We can use static_cast here since we have an instance of + // pgsql::transaction. + // + return static_cast ( + odb::transaction::implementation ()); + } + + inline transaction::database_type& transaction:: + database () + { + return static_cast (odb::transaction::database ()); + } + + inline transaction::connection_type& transaction:: + connection () + { + return implementation ().connection (); + } + } +} -- cgit v1.1