7 #include "flutter/fml/logging.h"
13 ArchiveStatement& beginStatement,
14 ArchiveStatement& endStatement,
15 ArchiveStatement& rollbackStatement)
16 : end_stmt_(endStatement),
17 rollback_stmt_(rollbackStatement),
18 transaction_count_(transactionCount) {
19 if (transaction_count_ == 0) {
26 : end_stmt_(other.end_stmt_),
27 rollback_stmt_(other.rollback_stmt_),
28 transaction_count_(other.transaction_count_),
29 cleanup_(other.cleanup_),
30 successful_(other.successful_) {
31 other.abandoned_ =
true;
39 FML_CHECK(transaction_count_ != 0);
40 if (transaction_count_ == 1 && cleanup_) {
41 auto res = successful_ ? end_stmt_.
Execute() : rollback_stmt_.
Execute();
43 <<
"Must be able to commit the nested transaction";