comparison Framework/Common/DatabaseManager.h @ 207:d9ef3f16e6a2

wrapping transactions in API v3
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Mar 2021 15:11:45 +0100
parents 3236894320d6
children 73cc85f3d9c1
comparison
equal deleted inserted replaced
206:6dcf57074dd4 207:d9ef3f16e6a2
75 GetDatabase(); 75 GetDatabase();
76 } 76 }
77 77
78 void Close(); 78 void Close();
79 79
80 void StartTransaction(); 80 void StartTransaction(TransactionType type);
81 81
82 void CommitTransaction(); 82 void CommitTransaction();
83 83
84 void RollbackTransaction(); 84 void RollbackTransaction();
85 85
92 DatabaseManager& manager_; 92 DatabaseManager& manager_;
93 IDatabase& database_; 93 IDatabase& database_;
94 bool committed_; 94 bool committed_;
95 95
96 public: 96 public:
97 explicit Transaction(DatabaseManager& manager); 97 explicit Transaction(DatabaseManager& manager,
98 TransactionType type);
98 99
99 ~Transaction(); 100 ~Transaction();
100 101
101 void Commit(); 102 void Commit();
102 103