![]() |
Leosac
0.8.0
Open Source Access Control
|
Provide a lightweight abstraction around the SAVEPOINT SQL concept. More...
#include <Savepoint.hpp>
Collaboration diagram for Leosac::db::Savepoint:Public Member Functions | |
| Savepoint (odb::database &db) | |
| Construct a Savepoint with a random name. More... | |
| Savepoint (odb::database &db, const std::string &name) | |
| Construct a Savepoint with a given name. More... | |
| Savepoint (const Savepoint &)=delete | |
| Savepoint (Savepoint &&o)=delete | |
| ~Savepoint () | |
| void | release () |
| Release the Savepoint if it wasn't released already, otherwise does nothing. More... | |
| bool | rollback_to () |
| Rollback to the Savepoint, unless the Savepoint was already released. More... | |
Private Attributes | |
| odb::database & | db_ |
| bool | released_ {false} |
| std::string | name_ |
Provide a lightweight abstraction around the SAVEPOINT SQL concept.
This class implements SAVEPOINT, RELEASE SAVEPOINT and ROLLBACK TO SAVEPOINT.
Definition at line 40 of file Savepoint.hpp.
| Leosac::db::Savepoint::Savepoint | ( | odb::database & | db | ) |
Construct a Savepoint with a random name.
Definition at line 38 of file Savepoint.cpp.
| Leosac::db::Savepoint::Savepoint | ( | odb::database & | db, |
| const std::string & | name | ||
| ) |
Construct a Savepoint with a given name.
Definition at line 43 of file Savepoint.cpp.
|
delete |
|
delete |
| Leosac::db::Savepoint::~Savepoint | ( | ) |
Definition at line 50 of file Savepoint.cpp.
| void Leosac::db::Savepoint::release | ( | ) |
Release the Savepoint if it wasn't released already, otherwise does nothing.
Definition at line 55 of file Savepoint.cpp.
| bool Leosac::db::Savepoint::rollback_to | ( | ) |
Rollback to the Savepoint, unless the Savepoint was already released.
Definition at line 64 of file Savepoint.cpp.
|
private |
Definition at line 74 of file Savepoint.hpp.
|
private |
Definition at line 76 of file Savepoint.hpp.
|
private |
Definition at line 75 of file Savepoint.hpp.