diff options
Diffstat (limited to 'odb/transaction.hxx')
-rw-r--r-- | odb/transaction.hxx | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/odb/transaction.hxx b/odb/transaction.hxx index 820ed8f..1958df3 100644 --- a/odb/transaction.hxx +++ b/odb/transaction.hxx @@ -1,5 +1,4 @@ // file : odb/transaction.hxx -// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file #ifndef ODB_TRANSACTION_HXX @@ -62,9 +61,17 @@ namespace odb // Return the connection this transaction is on. // + // The second version verifies the connection is to the specified + // database. For database implementations that support attaching multiple + // databases it may also select the connection corresponding to the + // specified database. + // connection_type& connection (); + connection_type& + connection (database_type&); + bool finalized () const {return finalized_;} @@ -216,6 +223,7 @@ namespace odb class LIBODB_EXPORT transaction_impl { public: + typedef odb::tracer tracer_type; typedef odb::database database_type; typedef odb::connection connection_type; @@ -237,11 +245,14 @@ namespace odb return database_; } - connection_type& - connection () - { - return *connection_; - } + virtual connection_type& + connection (database_type*); + + virtual void + tracer (tracer_type*); + + virtual tracer_type* + tracer () const; protected: transaction_impl (database_type& db) |