1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-02 09:54:42 +01:00

TransactionScope only requires DBConnection not ProjectFileIO

This commit is contained in:
Paul Licameli
2020-09-02 15:14:11 -04:00
parent eb7e67623e
commit ddc2593282
4 changed files with 24 additions and 24 deletions

View File

@@ -130,10 +130,6 @@ public:
// The last compact check found unused blocks in the project file
bool HadUnused();
bool TransactionStart(const wxString &name);
bool TransactionCommit(const wxString &name);
bool TransactionRollback(const wxString &name);
// In one SQL command, delete sample blocks with ids in the given set, or
// (when complement is true), with ids not in the given set.
bool DeleteBlocks(const BlockIDs &blockids, bool complement);
@@ -250,13 +246,17 @@ private:
class TransactionScope
{
public:
TransactionScope(ProjectFileIO &projectFileIO, const char *name);
TransactionScope(DBConnection &connection, const char *name);
~TransactionScope();
bool Commit();
private:
ProjectFileIO &mIO;
bool TransactionStart(const wxString &name);
bool TransactionCommit(const wxString &name);
bool TransactionRollback(const wxString &name);
DBConnection &mConnection;
bool mInTrans;
wxString mName;
};