mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
Move pipeline directory
This commit is contained in:
30
tooling/pipeline/src/services/sqlite/finalize.cc
Normal file
30
tooling/pipeline/src/services/sqlite/finalize.cc
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @file services/sqlite/finalize.cc
|
||||
* @brief SqliteExportService::Finalize() implementation.
|
||||
*/
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include "services/sqlite_export_service.h"
|
||||
#include "services/sqlite_export_service_helpers.h"
|
||||
|
||||
void SqliteExportService::Finalize() {
|
||||
if (db_handle_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
FinalizeStatements();
|
||||
if (transaction_open_) {
|
||||
sqlite_export_service_internal::ExecSql(
|
||||
db_handle_, "COMMIT;", "Failed to commit SQLite transaction");
|
||||
transaction_open_ = false;
|
||||
}
|
||||
|
||||
db_handle_.reset();
|
||||
location_cache_.clear();
|
||||
} catch (...) {
|
||||
RollbackAndCloseNoThrow();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user