libpqxx
4.0.1
|
Standard back-end transaction, templatized on isolation level. More...
#include <transaction.hxx>
Public Types | |
typedef isolation_traits < ISOLATIONLEVEL > | isolation_tag |
Public Member Functions | |
transaction (connection_base &C, const std::string &TName) | |
Create a transaction. | |
transaction (connection_base &C) | |
virtual | ~transaction () throw () |
Additional Inherited Members | |
![]() | |
basic_transaction (connection_base &C, const std::string &IsolationLevel, readwrite_policy) | |
![]() | |
static std::string | fullname (const std::string &ttype, const std::string &isolation) |
![]() | |
internal::reactivation_avoidance_counter | m_reactivation_avoidance |
Resources allocated in this transaction that make reactivation impossible. |
Standard back-end transaction, templatized on isolation level.
This is the type you'll normally want to use to represent a transaction on the database.
While you may choose to create your own transaction object to interface to the database backend, it is recommended that you wrap your transaction code into a transactor code instead and let the transaction be created for you.
If you should find that using a transactor makes your code less portable or too complex, go ahead, create your own transaction anyway.
Usage example: double all wages
typedef isolation_traits<ISOLATIONLEVEL> pqxx::transaction< ISOLATIONLEVEL, READWRITE >::isolation_tag |
|
explicit |
Create a transaction.
C | Connection for this transaction to operate on |
TName | Optional name for transaction; must begin with a letter and may contain letters and digits only |
References pqxx::transaction_base::Begin().
|
explicit |
References pqxx::transaction_base::Begin().
|
virtual |
References pqxx::transaction_base::conn(), and pqxx::transaction_base::End().