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

Method CloseHandles

src/objects/database.cpp:37–47  ·  view source on GitHub ↗

Whenever this is used, addon->dbs.erase() must be invoked beforehand.

Source from the content-addressed store, hash-verified

35
36// Whenever this is used, addon->dbs.erase() must be invoked beforehand.
37void Database::CloseHandles() {
38 if (open) {
39 open = false;
40 for (Statement* stmt : stmts) stmt->CloseHandles();
41 for (Backup* backup : backups) backup->CloseHandles();
42 stmts.clear();
43 backups.clear();
44 int status = sqlite3_close(db_handle);
45 assert(status == SQLITE_OK); ((void)status);
46 }
47}
48
49void Database::ThrowDatabaseError(Napi::Env env) {
50 if (was_js_error) was_js_error = false;

Callers 1

NODE_METHODFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected