pg_async
|
RAII transaction object. More...
#include <transaction.hpp>
Public Types | |
typedef std::shared_ptr < basic_connection > | connection_ptr |
typedef basic_connection * | pointer |
typedef basic_connection const * | const_pointer |
Public Member Functions | |
transaction (connection_ptr) | |
~transaction () | |
transaction (transaction const &)=delete | |
transaction & | operator= (transaction const &)=delete |
transaction (transaction &&)=delete | |
transaction & | operator= (transaction &&)=delete |
dbalias const & | alias () const |
bool | in_transaction () const |
void | commit () |
void | rollback () |
void | execute (std::string const &query, query_result_callback, query_error_callback) |
void | execute (std::string const &query, type_oid_sequence const ¶m_types, std::vector< byte > params_buffer, query_result_callback, query_error_callback) |
pointer | operator-> () |
const_pointer | operator-> () const |
pointer | operator* () |
const_pointer | operator* () const |
RAII transaction object.
It is created by the library internally when a transaction is started. It will rollback the transaction if it wasn't explicitly committed.
Definition at line 29 of file transaction.hpp.
typedef std::shared_ptr<basic_connection> tip::db::pg::transaction::connection_ptr |
Definition at line 31 of file transaction.hpp.
typedef basic_connection const* tip::db::pg::transaction::const_pointer |
Definition at line 33 of file transaction.hpp.
typedef basic_connection* tip::db::pg::transaction::pointer |
Definition at line 32 of file transaction.hpp.
tip::db::pg::transaction::transaction | ( | connection_ptr | ) |
tip::db::pg::transaction::~transaction | ( | ) |
|
delete |
|
delete |
dbalias const& tip::db::pg::transaction::alias | ( | ) | const |
void tip::db::pg::transaction::commit | ( | ) |
void tip::db::pg::transaction::execute | ( | std::string const & | query, |
query_result_callback | , | ||
query_error_callback | |||
) |
void tip::db::pg::transaction::execute | ( | std::string const & | query, |
type_oid_sequence const & | param_types, | ||
std::vector< byte > | params_buffer, | ||
query_result_callback | , | ||
query_error_callback | |||
) |
bool tip::db::pg::transaction::in_transaction | ( | ) | const |
|
inline |
Definition at line 59 of file transaction.hpp.
|
inline |
Definition at line 64 of file transaction.hpp.
|
inline |
Access to underlying connection object
Definition at line 48 of file transaction.hpp.
|
inline |
Definition at line 53 of file transaction.hpp.
|
delete |
|
delete |
void tip::db::pg::transaction::rollback | ( | ) |