MCPcopy Create free account
hub / github.com/audacity/audacity / Close

Method Close

libraries/lib-sqlite-helpers/sqlite/Connection.cpp:298–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298Error Connection::Close(bool force) noexcept
299{
300 // If there is a transaction in progress,
301 // rollback it.
302 std::vector<Transaction*> pendingTransactions;
303
304 for (auto* transaction : pendingTransactions)
305 if (auto err = transaction->Abort(); !force && err.IsError())
306 return err;
307
308 if (mConnection != nullptr && mIsOwned)
309 if(auto err = Error(sqlite3_close(mConnection)); err.IsError())
310 return err;
311
312 mConnection = nullptr;
313
314 return {};
315}
316
317std::string_view Connection::GetPath(const char* dbName) const noexcept
318{

Callers

nothing calls this directly

Calls 3

IsErrorMethod · 0.80
ErrorFunction · 0.70
AbortMethod · 0.45

Tested by

no test coverage detected