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

Method Database

src/objects/database.cpp:12–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10const napi_type_tag Database::TYPE_TAG = RandomTypeTag();
11
12Database::Database(const Napi::CallbackInfo& info) :
13 Napi::ObjectWrap<Database>(info),
14 db_handle(NULL),
15 open(false),
16 busy(false),
17 safe_ints(false),
18 unsafe_mode(false),
19 was_js_error(false),
20 has_logger(false),
21 iterators(0),
22 addon(static_cast<Addon*>(info.Data())),
23 logger(),
24 stmts(),
25 backups() {
26 napi_status status = napi_type_tag_object(info.Env(), info.This(), &TYPE_TAG);
27 assert(status == napi_ok); ((void)status);
28 JS_new(info);
29}
30
31Database::~Database() {
32 if (open) addon->dbs.erase(this);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected