10 #ifndef _MARIADB_TRANSACTION_HPP_ 11 #define _MARIADB_TRANSACTION_HPP_ std::shared_ptr< transaction > transaction_ref
connection * m_connection
Class representing a SQL transaction having automatic rollback functionality.
std::vector< save_point * > m_save_points
save_point_ref create_save_point()
Create named savepoint Note: only valid until the transaction is destroyed or committed.
Class used to represent a MariaDB savepoint having automatic rollback functionality.
void remove_save_point(save_point *sv_point)
Removes a savepoint from the list of savepoints.
transaction(connection *conn, isolation::level level, bool consistent_snapshot)
Create a transaction with given isolation level and snapshot setting.
Wraps a Database connection.
std::shared_ptr< save_point > save_point_ref
void cleanup()
Cleans up the transaction, releases all savepoints.
void commit()
Commits the changes, releases all savepoints.
virtual ~transaction()
Destructor initiates automatic rollback if changes were not committed.