mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-31 08:58:43 +01:00
Cut and paste TransactionScope into DBConnection.* files
This commit is contained in:
@@ -24,7 +24,6 @@ struct sqlite3_stmt;
|
||||
struct sqlite3_value;
|
||||
|
||||
class AudacityProject;
|
||||
class TransactionScope;
|
||||
class DBConnection;
|
||||
class ProjectSerializer;
|
||||
class SqliteSampleBlock;
|
||||
@@ -239,28 +238,6 @@ private:
|
||||
bool mPrevTemporary;
|
||||
};
|
||||
|
||||
// Make a savepoint (a transaction, possibly nested) with the given name;
|
||||
// roll it back at destruction time, unless an explicit Commit() happened first.
|
||||
// Commit() must not be called again after one successful call.
|
||||
// An exception is thrown from the constructor if the transaction cannot open.
|
||||
class TransactionScope
|
||||
{
|
||||
public:
|
||||
TransactionScope(DBConnection &connection, const char *name);
|
||||
~TransactionScope();
|
||||
|
||||
bool Commit();
|
||||
|
||||
private:
|
||||
bool TransactionStart(const wxString &name);
|
||||
bool TransactionCommit(const wxString &name);
|
||||
bool TransactionRollback(const wxString &name);
|
||||
|
||||
DBConnection &mConnection;
|
||||
bool mInTrans;
|
||||
wxString mName;
|
||||
};
|
||||
|
||||
class wxTopLevelWindow;
|
||||
|
||||
// TitleRestorer restores project window titles to what they were, in its destructor.
|
||||
|
||||
Reference in New Issue
Block a user