|
libpqxx
7.0.1
|
"Transaction" nested within another transaction More...
#include <subtransaction.hxx>

Public Member Functions | |
| subtransaction (dbtransaction &t, std::string const &name=std::string{}) | |
| Nest a subtransaction nested in another transaction. More... | |
| subtransaction (subtransaction &t, std::string const &name=std::string{}) | |
| Nest a subtransaction in another subtransaction. More... | |
| virtual | ~subtransaction () noexcept override |
Public Member Functions inherited from pqxx::internal::transactionfocus | |
| transactionfocus (transaction_base &t) | |
| transactionfocus ()=delete | |
| transactionfocus (transactionfocus const &)=delete | |
| transactionfocus & | operator= (transactionfocus const &)=delete |
Public Member Functions inherited from pqxx::internal::namedclass | |
| namedclass (std::string_view classname) | |
| namedclass (std::string_view classname, std::string_view name) | |
| namedclass (std::string_view classname, char const name[]) | |
| namedclass (std::string_view classname, std::string &&name) | |
| std::string const & | name () const noexcept |
| Object name, or the empty string if no name was given. More... | |
| std::string const & | classname () const noexcept |
| Class name. More... | |
| std::string | description () const |
| Combination of class name and object name; or just class name. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from pqxx::internal::transactionfocus | |
| void | register_me () |
| void | unregister_me () noexcept |
| void | reg_pending_error (std::string const &) noexcept |
| bool | registered () const noexcept |
Protected Member Functions inherited from pqxx::dbtransaction | |
| dbtransaction (connection &c) | |
Protected Attributes inherited from pqxx::internal::transactionfocus | |
| transaction_base & | m_trans |
"Transaction" nested within another transaction
A subtransaction can be executed inside a backend transaction, or inside another subtransaction. This can be useful when, for example, statements in a transaction may harmlessly fail and you don't want them to abort the entire transaction. Here's an example of how a temporary table may be dropped before re-creating it, without failing if the table did not exist:
(This is just an example. If you really wanted to do drop a table without an error if it doesn't exist, you'd use DROP TABLE IF EXISTS.)
There are no isolation levels inside a transaction. They are not needed because all actions within the same backend transaction are always performed sequentially anyway.
|
explicit |
Nest a subtransaction nested in another transaction.
Implementation of the pqxx::subtransaction class.
pqxx::transaction is a nested transaction, i.e. one within a transaction
Copyright (c) 2000-2020, Jeroen T. Vermeulen.
See COPYING for copyright license. If you did not receive a file called COPYING with this source code, please notify the distributor of this mistake, or contact the author.
|
explicit |
Nest a subtransaction in another subtransaction.
|
overridevirtualnoexcept |