# pqxx::dbtransaction Class Reference

`#include <dbtransaction.hxx>`

Inheritance diagram for pqxx::dbtransaction:

[legend]

List of all members.

## Protected Member Functions
| dbtransaction (connection_base &, const std::string &IsolationString)
| dbtransaction (connection_base &, bool direct=true)
virtual | ~dbtransaction ()
void | start_backend_transaction ()
| Start a transaction on the backend and set desired isolation level.
virtual void | do_begin ()
| Sensible default implemented here: begin backend transaction.
virtual result | do_exec (const char Query[])
| Sensible default implemented here: perform query.
virtual void | do_commit ()=0
| To be implemented by derived class: commit backend transaction.
virtual void | do_abort ()
| Sensible default implemented here: abort backend transaction.
## Static Protected Member Functions
static std::string | fullname (const std::string &ttype, const std::string &isolation)

## Constructor & Destructor Documentation

pqxx::dbtransaction::dbtransaction | ( | connection_base & | C,
|  | const std::string & | IsolationString |
| ) |  |  | `[protected]`

pqxx::dbtransaction::dbtransaction | ( | connection_base & | C,
|  | bool | direct = `true` |
| ) |  |  | `[explicit, protected]`

pqxx::dbtransaction::~dbtransaction | ( |  | ) | `[protected, virtual]`

## Member Function Documentation

void pqxx::dbtransaction::do_abort | ( |  | ) | `[protected, virtual]`

Sensible default implemented here: abort backend transaction.

Default implementation does two things:

1. Clears the "connection reactivation avoidance counter"
2. Executes a ROLLBACK statement

Implements pqxx::transaction_base.

References pqxx::transaction_base::DirectExec(), pqxx::transaction_base::reactivation_avoidance_clear(), and pqxx::internal::sql_rollback_work.

void pqxx::dbtransaction::do_begin | ( |  | ) | `[protected, virtual]`

Sensible default implemented here: begin backend transaction.

Implements pqxx::transaction_base.

References pqxx::transaction_base::conn(), pqxx::transaction_base::DirectExec(), pqxx::internal::reactivation_avoidance_counter::get(), and pqxx::connection_base::m_reactivation_avoidance.

virtual void pqxx::dbtransaction::do_commit | ( |  | ) | `[protected, pure virtual]`

To be implemented by derived class: commit backend transaction.

Implements pqxx::transaction_base.

pqxx::result pqxx::dbtransaction::do_exec | ( | const char | Query[] | ) | `[protected, virtual]`

Sensible default implemented here: perform query.

Implements pqxx::transaction_base.

References pqxx::transaction_base::abort(), and pqxx::transaction_base::DirectExec().

string pqxx::dbtransaction::fullname | ( | const std::string & | ttype,
|  | const std::string & | isolation |
| ) |  |  | `[static, protected]`

void pqxx::dbtransaction::start_backend_transaction | ( |  | ) | `[protected]`

Start a transaction on the backend and set desired isolation level.

The documentation for this class was generated from the following files:

- dbtransaction.hxx
- dbtransaction.cxx