diff options
Diffstat (limited to 'odb/pgsql/transaction.ixx')
-rw-r--r-- | odb/pgsql/transaction.ixx | 41 |
1 files changed, 41 insertions, 0 deletions
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 <constantin@codesynthesis.com> +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include <odb/pgsql/database.hxx> +#include <odb/pgsql/transaction-impl.hxx> + +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<transaction_impl&> ( + odb::transaction::implementation ()); + } + + inline transaction::database_type& transaction:: + database () + { + return static_cast<database_type&> (odb::transaction::database ()); + } + + inline transaction::connection_type& transaction:: + connection () + { + return implementation ().connection (); + } + } +} |