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

Method CloseHandles

src/objects/database.cpp:36–46  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

NODE_METHODFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected