MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / backup

Method backup

Source/3rdParty/sqlite/SQLiteCpp/Database.cpp:423–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423void Database::backup(const char* apFilename, BackupType aType)
424{
425 // Open the database file identified by apFilename
426 Database otherDatabase(apFilename, SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE);
427
428 // For a 'Save' operation, data is copied from the current Database to the other. A 'Load' is the reverse.
429 Database& src = (aType == BackupType::Save ? *this : otherDatabase);
430 Database& dest = (aType == BackupType::Save ? otherDatabase : *this);
431
432 // Set up the backup procedure to copy between the "main" databases of each connection
433 Backup bkp(dest, src);
434 bkp.executeStep(); // Execute all steps at once
435
436 // RAII Finish Backup an Close the other Database
437}
438
439} // namespace SQLite

Callers

nothing calls this directly

Calls 1

executeStepMethod · 0.45

Tested by

no test coverage detected