MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / CloseHandles

Method CloseHandles

src/objects/backup.cpp:21–30  ·  view source on GitHub ↗

Whenever this is used, db->RemoveBackup must be invoked beforehand.

Source from the content-addressed store, hash-verified

19
20// Whenever this is used, db->RemoveBackup must be invoked beforehand.
21void 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
32INIT(Backup::Init) {
33 return DefineClass(env, "Backup", {

Callers 2

CleanupMethod · 0.45
NODE_METHODFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected