Whenever this is used, db->RemoveBackup must be invoked beforehand.
| 19 | |
| 20 | // Whenever this is used, db->RemoveBackup must be invoked beforehand. |
| 21 | void Backup::CloseHandles() { |
| 22 | if (alive) { |
| 23 | alive = false; |
| 24 | std::string filename(sqlite3_db_filename(dest_handle, "main")); |
| 25 | sqlite3_backup_finish(backup_handle); |
| 26 | int status = sqlite3_close(dest_handle); |
| 27 | assert(status == SQLITE_OK); ((void)status); |
| 28 | if (unlink) remove(filename.c_str()); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | INIT(Backup::Init) { |
| 33 | return DefineClass(env, "Backup", { |
no outgoing calls
no test coverage detected