From 63295f6e051e75cf07cb6212a2631df8eb8a90c4 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Mon, 5 Sep 2011 12:10:45 +0200 Subject: Add database, connection, connection-factory, and transaction support --- odb/oracle/transaction.hxx | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 odb/oracle/transaction.hxx (limited to 'odb/oracle/transaction.hxx') diff --git a/odb/oracle/transaction.hxx b/odb/oracle/transaction.hxx new file mode 100644 index 0000000..5d6c460 --- /dev/null +++ b/odb/oracle/transaction.hxx @@ -0,0 +1,65 @@ +// file : odb/oracle/transaction.hxx +// author : Constantin Michael +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : ODB NCUEL; see accompanying LICENSE file + +#ifndef ODB_ORACLE_TRANSACTION_HXX +#define ODB_ORACLE_TRANSACTION_HXX + +#include + +#include + +#include +#include + +#include + +namespace odb +{ + namespace oracle + { + class transaction_impl; + + class LIBODB_ORACLE_EXPORT transaction: public odb::transaction + { + public: + typedef oracle::database database_type; + typedef oracle::connection connection_type; + + explicit + transaction (transaction_impl*); + + // Return the database this transaction is on. + // + database_type& + database (); + + // Return the underlying database connection for this transaction. + // + connection_type& + connection (); + + // Return current transaction or throw if there is no transaction + // in effect. + // + static transaction& + current (); + + // Set the current thread's transaction. + // + static void + current (transaction&); + + public: + transaction_impl& + implementation (); + }; + } +} + +#include + +#include + +#endif // ODB_ORACLE_TRANSACTION_HXX -- cgit v1.1